1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/views/accounts/settings.blade.php

76 lines
2.2 KiB
PHP
Raw Normal View History

2013-11-26 13:45:07 +01:00
@extends('accounts.nav')
@section('content')
@parent
2013-12-15 13:55:50 +01:00
{{ Former::open()->addClass('col-md-8 col-md-offset-2') }}
2013-12-04 17:20:14 +01:00
{{ Former::populate($account) }}
{{ Former::legend('Payment Gateway') }}
2013-11-26 13:45:07 +01:00
@if ($accountGateway)
{{ Former::populateField('gateway_id', $accountGateway->gateway_id) }}
@foreach ($accountGateway->fields as $field => $junk)
{{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }}
@endforeach
@endif
2013-11-26 13:45:07 +01:00
{{ Former::select('gateway_id')->label('Provider')->addOption('', '')->fromQuery($gateways, 'name', 'id')->onchange('setFieldsShown()'); }}
@foreach ($gateways as $gateway)
2013-11-26 13:45:07 +01:00
<div id="gateway_{{ $gateway->id }}_div" style="display: none">
@foreach ($gateway->fields as $field => $details)
@if ($field == 'solutionType' || $field == 'landingPage')
{{-- do nothing --}}
@elseif ($field == 'testMode' || $field == 'developerMode')
2013-12-07 21:33:07 +01:00
{{ Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable') }}
@else
2013-12-07 21:33:07 +01:00
{{ Former::text($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field)) }}
2013-11-26 13:45:07 +01:00
@endif
2013-11-26 13:45:07 +01:00
@endforeach
</div>
2013-11-26 13:45:07 +01:00
@endforeach
2013-12-15 13:55:50 +01:00
{{ Former::legend('Date and Time') }}
{{ Former::select('timezone_id')->addOption('','')->label('Timezone')
->fromQuery($timezones, 'location', 'id')->select($account->timezone_id) }}
{{ Former::select('date_format_id')->addOption('','')->label('Date Format')
->fromQuery($dateFormats, 'label', 'id')->select($account->date_format_id) }}
{{ Former::select('datetime_format_id')->addOption('','')->label('Date/Time Format')
->fromQuery($datetimeFormats, 'label', 'id')->select($account->datetime_format_id) }}
2013-12-08 14:32:49 +01:00
{{ Former::legend('Invoices') }}
{{ Former::textarea('invoice_terms') }}
2013-11-26 13:45:07 +01:00
{{ Former::actions( Button::lg_primary_submit('Save') ) }}
{{ Former::close() }}
<script type="text/javascript">
var gateways = {{ $gateways }};
function setFieldsShown() {
var val = $('#gateway_id').val();
for (var i=0; i<gateways.length; i++) {
var gateway = gateways[i];
if (val == gateway.id) {
$('#gateway_' + gateway.id + '_div').show();
2013-11-26 13:45:07 +01:00
} else {
$('#gateway_' + gateway.id + '_div').hide();
}
2013-11-26 13:45:07 +01:00
}
}
2013-11-26 13:45:07 +01:00
$(function() {
setFieldsShown();
2013-11-26 13:45:07 +01:00
});
</script>
@stop