58 lines
2.4 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.currencies', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
2017-09-14 22:21:00 +03:00
{!! Form::model($currency, [
2019-11-16 10:21:14 +03:00
'id' => 'currency',
2017-09-14 22:21:00 +03:00
'method' => 'PATCH',
2019-11-16 10:21:14 +03:00
'route' => ['currencies.update', $currency->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
2018-09-17 13:57:03 +03:00
'role' => 'form',
2019-11-16 10:21:14 +03:00
'class' => 'form-loading-button',
'novalidate' => true
2017-09-14 22:21:00 +03:00
]) !!}
2019-11-16 10:21:14 +03:00
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'chart-bar') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, $currency->code, ['required' => 'required', 'change' => 'onCodeAccount']) }}
2017-09-14 22:21:00 +03:00
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'RateReplace', 'required' => 'required']) }}
2017-09-14 22:21:00 +03:00
2020-01-06 10:52:04 +03:00
{{ Form::textGroup('precision', trans('currencies.precision'), 'dot-circle') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
2017-12-09 16:24:18 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')], $currency->symbol_first) }}
2017-12-09 16:24:18 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'sign') }}
2017-12-09 16:24:18 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'slash', []) }}
2017-12-09 16:24:18 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('enabled', trans('general.enabled'), $currency->enabled) }}
2017-12-09 16:24:18 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('default_currency', trans('currencies.default'), $currency->default_currency) }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
@permission('update-settings-currencies')
<div class="card-footer">
<div class="row float-right">
{{ Form::saveButtons('settings/currencies') }}
</div>
</div>
@endpermission
2017-09-14 22:21:00 +03:00
{!! Form::close() !!}
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/settings/currencies.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush