mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Fix 'View Quote' button label preview
This commit is contained in:
parent
211bc16a24
commit
787c7e2d95
@ -161,7 +161,8 @@
|
||||
var idName = '#email_' + stringType + '_' + entityType;
|
||||
var value = $(idName).val();
|
||||
var previewName = '#' + entityType + '_' + stringType + '_preview';
|
||||
$(previewName).html(renderEmailTemplate(value));
|
||||
var isQuote = entityType == "{{ ENTITY_QUOTE }}";
|
||||
$(previewName).html(renderEmailTemplate(value, false, isQuote));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
function renderEmailTemplate(str, invoice) {
|
||||
function renderEmailTemplate(str, invoice, isQuote) {
|
||||
if (!str) {
|
||||
return '';
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
'password': passwordHtml,
|
||||
'documents': documentsHtml,
|
||||
'viewLink': '{{ link_to('#', url('/view/...')) }}$password',
|
||||
'viewButton': invoice && invoice.invoice_type_id == {{ INVOICE_TYPE_QUOTE }} ?
|
||||
'viewButton': isQuote || (invoice && invoice.invoice_type_id == {{ INVOICE_TYPE_QUOTE }}) ?
|
||||
'{!! Form::flatButton('view_quote', '#0b4d78') !!}$password' :
|
||||
'{!! Form::flatButton('view_invoice', '#0b4d78') !!}$password',
|
||||
'paymentLink': '{{ link_to('#', url('/payment/...')) }}$password',
|
||||
|
Loading…
Reference in New Issue
Block a user