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
|
|
|
|
2020-02-03 17:55:17 +03:00
|
|
|
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, $currency->code, ['required' => 'required', 'change' => 'onChangeCode']) }}
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2020-02-14 15:56:07 +03:00
|
|
|
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'onChangeRate', 'required' => 'required']) }}
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2020-09-08 11:04:18 +03:00
|
|
|
{{ Form::selectGroup('precision', trans('currencies.precision'), 'dot-circle', $precisions, $currency->precision, ['model' => 'form.precision']) }}
|
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
|
|
|
|
2020-02-14 14:58:02 +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, ['model' => 'form.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">
|
2020-02-15 13:04:37 +03:00
|
|
|
<div class="row save-buttons">
|
2020-02-03 14:09:52 +03:00
|
|
|
{{ Form::saveButtons('currencies.index') }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</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
|