mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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 idName = '#email_' + stringType + '_' + entityType;
|
||||||
var value = $(idName).val();
|
var value = $(idName).val();
|
||||||
var previewName = '#' + entityType + '_' + stringType + '_preview';
|
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">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function renderEmailTemplate(str, invoice) {
|
function renderEmailTemplate(str, invoice, isQuote) {
|
||||||
if (!str) {
|
if (!str) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@
|
|||||||
'password': passwordHtml,
|
'password': passwordHtml,
|
||||||
'documents': documentsHtml,
|
'documents': documentsHtml,
|
||||||
'viewLink': '{{ link_to('#', url('/view/...')) }}$password',
|
'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_quote', '#0b4d78') !!}$password' :
|
||||||
'{!! Form::flatButton('view_invoice', '#0b4d78') !!}$password',
|
'{!! Form::flatButton('view_invoice', '#0b4d78') !!}$password',
|
||||||
'paymentLink': '{{ link_to('#', url('/payment/...')) }}$password',
|
'paymentLink': '{{ link_to('#', url('/payment/...')) }}$password',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user