1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Removed client fields from buy now buttons UI

This commit is contained in:
Hillel Coren 2017-03-08 11:08:34 +02:00
parent cc9c3a3b30
commit d786c3ec77

View File

@ -236,14 +236,6 @@
->inlineHelp('buy_now_buttons_warning')
->addGroupClass('product-select') !!}
{!! Former::inline_checkboxes('client_fields')
->onchange('updateBuyNowButtons()')
->checkboxes([
trans('texts.email') => ['value' => 'email', 'name' => 'email'],
trans('texts.first_name') => ['value' => 'first_name', 'name' => 'first_name'],
trans('texts.last_name') => ['value' => 'last_name', 'name' => 'last_name'],
]) !!}
{!! Former::inline_radios('landing_page')
->onchange('showPaymentTypes();updateBuyNowButtons();')
->radios([
@ -430,13 +422,6 @@ iframe.src = '{{ rtrim(SITE_URL ,'/') }}/view/'
var form = '<form action="' + link + '" method="post" target="_top">' + "\n";
@foreach (['first_name', 'last_name', 'email'] as $field)
if ($('input#{{ $field }}').is(':checked')) {
form += '<input type="{{ $field == 'email' ? 'email' : 'text' }}" name="{{ $field }}" placeholder="{{ trans("texts.{$field}") }}" required/>' + "\n";
link += '&{{ $field }}=';
}
@endforeach
if (redirectUrl) {
link += '&redirect_url=' + encodeURIComponent(redirectUrl);
form += '<input type="hidden" name="redirect_url" value="' + redirectUrl + '"/>' + "\n";