From 70e60e5c8424f1623124eb8503f46f2c26a2e385 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Thu, 25 Mar 2021 23:34:16 +0300 Subject: [PATCH] show attribute added to form partials --- resources/views/partials/form/checkbox_group.blade.php | 6 +++++- resources/views/partials/form/email_group.blade.php | 6 +++++- resources/views/partials/form/file_group.blade.php | 6 +++++- resources/views/partials/form/invoice_text.blade.php | 6 +++++- resources/views/partials/form/password_group.blade.php | 6 +++++- resources/views/partials/form/radio_group.blade.php | 6 +++++- resources/views/partials/form/text_editor_group.blade.php | 6 +++++- resources/views/partials/form/text_group.blade.php | 6 +++++- resources/views/partials/form/textarea_group.blade.php | 6 +++++- 9 files changed, 45 insertions(+), 9 deletions(-) diff --git a/resources/views/partials/form/checkbox_group.blade.php b/resources/views/partials/form/checkbox_group.blade.php index f09b974b4..f304bbe19 100644 --- a/resources/views/partials/form/checkbox_group.blade.php +++ b/resources/views/partials/form/checkbox_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/email_group.blade.php b/resources/views/partials/form/email_group.blade.php index 6dafea227..d0f7b1959 100644 --- a/resources/views/partials/form/email_group.blade.php +++ b/resources/views/partials/form/email_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index 1b7158f4d..88d868e84 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': errors.{{ $name }}}]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/invoice_text.blade.php b/resources/views/partials/form/invoice_text.blade.php index 12ca9e5fe..202a15e26 100644 --- a/resources/views/partials/form/invoice_text.blade.php +++ b/resources/views/partials/form/invoice_text.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/password_group.blade.php b/resources/views/partials/form/password_group.blade.php index eefbe1469..484f48e8f 100644 --- a/resources/views/partials/form/password_group.blade.php +++ b/resources/views/partials/form/password_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/radio_group.blade.php b/resources/views/partials/form/radio_group.blade.php index 65a7674d9..977d2f9bf 100644 --- a/resources/views/partials/form/radio_group.blade.php +++ b/resources/views/partials/form/radio_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/text_editor_group.blade.php b/resources/views/partials/form/text_editor_group.blade.php index 6c3708cfd..169a8b26e 100644 --- a/resources/views/partials/form/text_editor_group.blade.php +++ b/resources/views/partials/form/text_editor_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/text_group.blade.php b/resources/views/partials/form/text_group.blade.php index f73c617e6..36d0cff4d 100644 --- a/resources/views/partials/form/text_group.blade.php +++ b/resources/views/partials/form/text_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/textarea_group.blade.php b/resources/views/partials/form/textarea_group.blade.php index 8082b0dc6..fb4424bf7 100644 --- a/resources/views/partials/form/textarea_group.blade.php +++ b/resources/views/partials/form/textarea_group.blade.php @@ -2,7 +2,11 @@
+ :class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]" + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + > @if (!empty($text)) {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif