mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Added custom fields to buy now buttons
This commit is contained in:
parent
f1486ca6eb
commit
bae3fbb9c0
@ -432,10 +432,10 @@ iframe.src = '{{ rtrim(SITE_URL ,'/') }}/view/'
|
|||||||
|
|
||||||
var form = '<form action="' + link + '" method="post" target="_top">' + "\n";
|
var form = '<form action="' + link + '" method="post" target="_top">' + "\n";
|
||||||
|
|
||||||
@foreach (['custom_client1', 'custom_client2', 'custom_invoice1', 'custom_invoice2', 'custom_product1', 'custom_product2'] as $field)
|
@foreach ($account->present()->customTextFields as $field => $val)
|
||||||
if ($('input#{{ $field }}').is(':checked')) {
|
if ($('input#{{ $val['name'] }}').is(':checked')) {
|
||||||
form += '<input type="text" name="{{ $field }}" placeholder="{{ trans("texts.{$field}") }}" required/>' + "\n";
|
form += '<input type="text" name="{{ $val['name'] }}" placeholder="{{ $field }}" required/>' + "\n";
|
||||||
link += '&{{ $field }}=';
|
link += '&{{ $val['name'] }}=';
|
||||||
}
|
}
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user