2015-10-14 16:15:39 +02:00
|
|
|
@extends('header')
|
|
|
|
|
2016-10-20 16:17:47 +02:00
|
|
|
@section('head')
|
|
|
|
@parent
|
|
|
|
|
|
|
|
@include('money_script')
|
|
|
|
@stop
|
|
|
|
|
2016-05-22 12:10:58 +02:00
|
|
|
@section('content')
|
2015-10-14 16:15:39 +02:00
|
|
|
@parent
|
|
|
|
|
|
|
|
{!! Former::open_for_files()->addClass('warn-on-exit') !!}
|
|
|
|
{{ Former::populate($account) }}
|
2015-10-22 20:48:12 +02:00
|
|
|
{{ Former::populateField('military_time', intval($account->military_time)) }}
|
2016-02-04 15:19:49 +01:00
|
|
|
{{ Former::populateField('show_currency_code', intval($account->show_currency_code)) }}
|
2015-10-14 16:15:39 +02:00
|
|
|
|
|
|
|
@include('accounts.nav', ['selected' => ACCOUNT_LOCALIZATION])
|
|
|
|
|
|
|
|
<div class="row">
|
2016-05-22 12:10:58 +02:00
|
|
|
|
2016-03-22 11:08:48 +01:00
|
|
|
<div class="col-md-12">
|
2015-10-14 16:15:39 +02:00
|
|
|
|
2016-03-22 11:08:48 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.localization') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body form-padding-right">
|
|
|
|
|
2016-10-20 16:17:47 +02:00
|
|
|
{!! Former::select('currency_id')
|
|
|
|
->addOption('','')
|
|
|
|
->fromQuery($currencies, 'name', 'id')
|
|
|
|
->onchange('updateCurrencyCodeRadio()') !!}
|
|
|
|
{!! Former::radios('show_currency_code')->radios([
|
|
|
|
trans('texts.currency_symbol') . ': <span id="currency_symbol_example"/>' => array('name' => 'show_currency_code', 'value' => 0),
|
|
|
|
trans('texts.currency_code') . ': <span id="currency_code_example"/>' => array('name' => 'show_currency_code', 'value' => 1),
|
|
|
|
])->inline()
|
|
|
|
->check('timer')
|
|
|
|
->label(' ')
|
|
|
|
->addGroupClass('currrency_radio') !!}
|
|
|
|
<br/>
|
|
|
|
|
2016-03-22 11:08:48 +01:00
|
|
|
{!! Former::select('language_id')->addOption('','')
|
2016-10-05 20:20:00 +02:00
|
|
|
->fromQuery($languages, 'name', 'id')
|
|
|
|
->help(trans('texts.translate_app', ['link' => link_to(TRANSIFEX_URL, 'Transifex.com', ['target' => '_blank'])])) !!}
|
2016-10-20 16:17:47 +02:00
|
|
|
<br/>
|
|
|
|
|
2016-03-22 11:08:48 +01:00
|
|
|
{!! Former::select('timezone_id')->addOption('','')
|
|
|
|
->fromQuery($timezones, 'location', 'id') !!}
|
|
|
|
{!! Former::select('date_format_id')->addOption('','')
|
2016-05-22 12:10:58 +02:00
|
|
|
->fromQuery($dateFormats) !!}
|
2016-03-22 11:08:48 +01:00
|
|
|
{!! Former::select('datetime_format_id')->addOption('','')
|
2016-05-22 12:10:58 +02:00
|
|
|
->fromQuery($datetimeFormats) !!}
|
2016-07-04 16:20:22 +02:00
|
|
|
{!! Former::select('start_of_week')->addOption('','')
|
|
|
|
->fromQuery($weekdays) !!}
|
2016-03-22 11:08:48 +01:00
|
|
|
{!! Former::checkbox('military_time')->text(trans('texts.enable')) !!}
|
|
|
|
|
|
|
|
</div>
|
2015-10-14 16:15:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<center>
|
|
|
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
|
|
|
</center>
|
|
|
|
|
|
|
|
{!! Former::close() !!}
|
|
|
|
|
2016-10-20 16:17:47 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
function updateCurrencyCodeRadio() {
|
|
|
|
var currencyId = $('#currency_id').val();
|
|
|
|
var currency = currencyMap[currencyId];
|
|
|
|
var symbolExample = '';
|
|
|
|
var codeExample = '';
|
|
|
|
|
|
|
|
if ( ! currency || ! currency.symbol) {
|
|
|
|
$('.currrency_radio').hide();
|
|
|
|
} else {
|
|
|
|
symbolExample = formatMoney(100, currencyId, {{ Auth::user()->account->country_id }}, '{{ CURRENCY_DECORATOR_SYMBOL }}');
|
|
|
|
codeExample = formatMoney(100, currencyId, {{ Auth::user()->account->country_id }}, '{{ CURRENCY_DECORATOR_CODE }}');
|
|
|
|
$('.currrency_radio').show();
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#currency_symbol_example').text(symbolExample);
|
|
|
|
$('#currency_code_example').text(codeExample);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2015-10-14 16:15:39 +02:00
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('onReady')
|
|
|
|
$('#currency_id').focus();
|
2016-10-20 16:17:47 +02:00
|
|
|
updateCurrencyCodeRadio();
|
2016-05-22 12:10:58 +02:00
|
|
|
@stop
|