akaunting/resources/views/partials/form/date_group.blade.php

76 lines
2.5 KiB
PHP
Raw Normal View History

2019-11-16 10:21:14 +03:00
@stack($name . '_input_start')
2020-02-01 13:32:43 +03:00
<akaunting-date
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
2020-01-20 18:16:56 +03:00
2020-02-01 13:32:43 +03:00
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
2020-01-20 18:16:56 +03:00
:group_class="'{{ $group_class }}'"
2020-02-14 14:56:58 +03:00
icon="fa fa-{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
@if (isset($value) || old($name))
2020-02-14 14:56:58 +03:00
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
2020-02-01 13:32:43 +03:00
:config="{
allowInput: true,
@if (!empty($attributes['show-date-format']))
altInput: true,
altFormat: '{{ $attributes['show-date-format'] }}',
@endif
@if (!empty($attributes['date-format']))
dateFormat: '{{ $attributes['date-format'] }}'
@endif
2020-02-09 13:11:39 +03:00
@if (!empty($attributes['min-date']))
minDate: {{ $attributes['min-date'] }}
@endif
@if (!empty($attributes['max-date']))
maxDate: {{ $attributes['max-date'] }}
@endif
2020-02-01 13:32:43 +03:00
}"
2020-01-20 18:16:56 +03:00
2020-02-01 13:32:43 +03:00
@if (!empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
2020-02-01 13:32:43 +03:00
@elseif (!empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
2020-02-01 13:32:43 +03:00
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
2020-02-01 13:32:43 +03:00
@endif
@if (isset($attributes['required']))
:required="{{ ($attributes['required']) ? 'true' : 'false' }}"
@endif
@if (isset($attributes['readonly']))
2020-03-19 22:39:52 +03:00
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['disabled']))
2020-03-19 22:39:52 +03:00
:disabled="{{ $attributes['disabled'] }}"
@endif
@if (isset($attributes['show']))
v-if="{{ $attributes['show'] }}"
@endif
@if (isset($attributes['v-error-message']))
2020-02-01 13:32:43 +03:00
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
2020-01-20 18:16:56 +03:00
></akaunting-date>
2019-11-16 10:21:14 +03:00
@stack($name . '_input_end')