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

41 lines
1.7 KiB
PHP
Raw Normal View History

2019-11-22 15:16:57 +03:00
@stack($name . '_input_start')
2020-02-01 13:32:43 +03:00
<div
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
2020-02-01 13:32:43 +03:00
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
@if (!empty($text))
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
@endif
2019-11-22 15:16:57 +03:00
<akaunting-html-editor
2020-02-14 14:56:58 +03:00
name="{{ $name }}"
2020-01-20 18:16:56 +03:00
2020-02-01 13:32:43 +03:00
@if (!empty($attributes['v-model']))
:value="{{ $attributes['v-model'] . ' = ' . `$value` }}"
2020-02-01 13:32:43 +03:00
@elseif (!empty($attributes['data-field']))
:value="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = '. `$value` }}"
2020-02-01 13:32:43 +03:00
@else
:value="form.{{ $name }} = `{{ $value }}`"
2020-02-01 13:32:43 +03:00
@endif
2020-01-20 18:16:56 +03:00
2020-02-01 13:32:43 +03:00
@if (!empty($attributes['v-model']))
@input="{{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@input="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@input="form.{{ $name }} = $event"
@endif
@if (isset($attributes['disabled']))
2020-03-19 22:39:52 +03:00
:disabled="{{ $attributes['disabled'] }}"
@endif
></akaunting-html-editor>
2019-11-22 15:16:57 +03:00
2020-02-01 13:32:43 +03:00
<div class="invalid-feedback d-block"
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
</div>
2019-11-22 15:16:57 +03:00
</div>
@stack($name . '_input_end')