From b02e46c062b462e9b4492801be7cae3292fe4548 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 22 Jun 2021 10:35:17 +0300 Subject: [PATCH 1/2] Textarea bugfix solved in modal --- resources/views/modals/companies/edit.blade.php | 4 ++++ resources/views/modals/customers/edit.blade.php | 6 +++++- resources/views/modals/vendors/edit.blade.php | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/resources/views/modals/companies/edit.blade.php b/resources/views/modals/companies/edit.blade.php index 55374ee8b..9d9a847d2 100644 --- a/resources/views/modals/companies/edit.blade.php +++ b/resources/views/modals/companies/edit.blade.php @@ -20,6 +20,10 @@ {{ Form::textareaGroup('address', trans('settings.company.address'), null, setting('company.address')) }} +
+ +
+ {!! Form::hidden('_prefix', 'company') !!} {!! Form::close() !!} diff --git a/resources/views/modals/customers/edit.blade.php b/resources/views/modals/customers/edit.blade.php index effce1212..6b93b3f48 100644 --- a/resources/views/modals/customers/edit.blade.php +++ b/resources/views/modals/customers/edit.blade.php @@ -19,7 +19,11 @@ {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $customer->currency_code) }} - {{ Form::textareaGroup('address', trans('general.address'), $customer->address) }} + {{ Form::textareaGroup('address', trans('general.address'), null, $customer->address) }} + +
+ +
{{ Form::hidden('type', 'customer') }} {!! Form::hidden('enabled', '1', []) !!} diff --git a/resources/views/modals/vendors/edit.blade.php b/resources/views/modals/vendors/edit.blade.php index f9980db67..2b65fd4fc 100644 --- a/resources/views/modals/vendors/edit.blade.php +++ b/resources/views/modals/vendors/edit.blade.php @@ -19,7 +19,11 @@ {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $vendor->currency_code) }} - {{ Form::textareaGroup('address', trans('general.address')) }} + {{ Form::textareaGroup('address', trans('general.address'), null, $vendor->address) }} + +
+ +
{{ Form::hidden('type', 'vendor') }} {!! Form::hidden('enabled', '1', []) !!} From a5b42b9db044253727c4fb579796169698303e96 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 23 Jun 2021 18:23:15 +0300 Subject: [PATCH 2/2] Textarea value control edited --- resources/views/modals/companies/edit.blade.php | 4 ---- resources/views/modals/customers/edit.blade.php | 4 ---- resources/views/modals/vendors/edit.blade.php | 4 ---- resources/views/partials/form/textarea_group.blade.php | 3 +-- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/resources/views/modals/companies/edit.blade.php b/resources/views/modals/companies/edit.blade.php index 9d9a847d2..55374ee8b 100644 --- a/resources/views/modals/companies/edit.blade.php +++ b/resources/views/modals/companies/edit.blade.php @@ -20,10 +20,6 @@ {{ Form::textareaGroup('address', trans('settings.company.address'), null, setting('company.address')) }} -
- -
- {!! Form::hidden('_prefix', 'company') !!} {!! Form::close() !!} diff --git a/resources/views/modals/customers/edit.blade.php b/resources/views/modals/customers/edit.blade.php index 6b93b3f48..60097f7e2 100644 --- a/resources/views/modals/customers/edit.blade.php +++ b/resources/views/modals/customers/edit.blade.php @@ -21,10 +21,6 @@ {{ Form::textareaGroup('address', trans('general.address'), null, $customer->address) }} -
- -
- {{ Form::hidden('type', 'customer') }} {!! Form::hidden('enabled', '1', []) !!} diff --git a/resources/views/modals/vendors/edit.blade.php b/resources/views/modals/vendors/edit.blade.php index 2b65fd4fc..f8447b916 100644 --- a/resources/views/modals/vendors/edit.blade.php +++ b/resources/views/modals/vendors/edit.blade.php @@ -21,10 +21,6 @@ {{ Form::textareaGroup('address', trans('general.address'), null, $vendor->address) }} -
- -
- {{ Form::hidden('type', 'vendor') }} {!! Form::hidden('enabled', '1', []) !!} diff --git a/resources/views/partials/form/textarea_group.blade.php b/resources/views/partials/form/textarea_group.blade.php index fb4424bf7..98aac2ec9 100644 --- a/resources/views/partials/form/textarea_group.blade.php +++ b/resources/views/partials/form/textarea_group.blade.php @@ -14,9 +14,8 @@ {!! Form::textarea($name, $value, array_merge([ 'class' => 'form-control', 'data-name' => $name, - 'data-value' => $value, 'placeholder' => trans('general.form.enter', ['field' => $text]), - 'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name), + '@input' => !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event.target.value' : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name . ' = $event.target.value' : 'form.' . $name . ' = $event.target.value'), ], $attributes)) !!}