1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Added custom fields to buy now buttons

This commit is contained in:
Hillel Coren 2017-03-30 12:52:53 +03:00
parent f1486ca6eb
commit bae3fbb9c0

View File

@ -432,10 +432,10 @@ iframe.src = '{{ rtrim(SITE_URL ,'/') }}/view/'
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)
if ($('input#{{ $field }}').is(':checked')) {
form += '<input type="text" name="{{ $field }}" placeholder="{{ trans("texts.{$field}") }}" required/>' + "\n";
link += '&{{ $field }}=';
@foreach ($account->present()->customTextFields as $field => $val)
if ($('input#{{ $val['name'] }}').is(':checked')) {
form += '<input type="text" name="{{ $val['name'] }}" placeholder="{{ $field }}" required/>' + "\n";
link += '&{{ $val['name'] }}=';
}
@endforeach