@extends('accounts.nav') @section('content') @parent {!! Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!} {!! Former::populate($account) !!}

{!! trans($title) !!}

@if ($accountGateway) {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} {!! Former::populateField('payment_type_id', $paymentTypeId) !!} {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} {!! Former::populateField('show_address', intval($accountGateway->show_address)) !!} {!! Former::populateField('update_address', intval($accountGateway->update_address)) !!} @if ($config) @foreach ($accountGateway->fields as $field => $junk) @if (in_array($field, $hiddenFields)) {{-- do nothing --}} @elseif (isset($config->$field)) {{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }} @endif @endforeach @endif @else {!! Former::populateField('gateway_id', GATEWAY_STRIPE) !!} {!! Former::populateField('show_address', 1) !!} {!! Former::populateField('update_address', 1) !!} @endif {!! Former::select('payment_type_id') ->options($paymentTypes) ->addGroupClass('payment-type-option') ->onchange('setPaymentType()') !!} {!! Former::select('gateway_id') ->dataClass('gateway-dropdown') ->addGroupClass('gateway-option') ->fromQuery($selectGateways, 'name', 'id') ->onchange('setFieldsShown()') !!} @foreach ($gateways as $gateway) @endforeach {!! Former::checkbox('show_address') ->label(trans('texts.billing_address')) ->text(trans('texts.show_address_help')) ->addGroupClass('gateway-option') !!} {!! Former::checkbox('update_address') ->label(' ') ->text(trans('texts.update_address_help')) ->addGroupClass('gateway-option') !!} {!! Former::checkboxes('creditCardTypes[]') ->label('Accepted Credit Cards') ->checkboxes($creditCardTypes) ->class('creditcard-types') ->addGroupClass('gateway-option') !!}

 

{!! Former::actions( $countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/payments'))->appendIcon(Icon::create('remove-circle')) : false, Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))) !!} {!! Former::close() !!} @stop