@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('payment_type_id', $paymentTypeId) !!} {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} @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) !!} @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::checkboxes('creditCardTypes[]') ->label('Accepted Credit Cards') ->checkboxes($creditCardTypes) ->class('creditcard-types') ->addGroupClass('gateway-option') !!}

 

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