Skip to content

Commit

Permalink
close #1282 Fixed: Selected value not reflected to select box, causes…
Browse files Browse the repository at this point in the history
… fatal error after save
  • Loading branch information
cuneytsenturk committed Feb 24, 2020
1 parent bd7fb93 commit 4ad2ebf
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion resources/views/partials/form/date_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"

@if (old($name, $value))
@if (isset($value) || old($name))
value="{{ old($name, $value) }}"
@endif

Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/date_time_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"

@if(old($name, $value))
@if (isset($value) || old($name))
value="{{ old($name, $value) }}"
@endif

Expand Down Expand Up @@ -60,7 +60,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ json_encode(old($name, $selected)) }}"
@endif

Expand Down Expand Up @@ -67,7 +67,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/multi_select_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ json_encode(old($name, $selected)) }}"
@endif

Expand Down Expand Up @@ -49,7 +49,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/select_add_new_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif

Expand Down Expand Up @@ -61,7 +61,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/select_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif

Expand Down Expand Up @@ -43,7 +43,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif

Expand Down Expand Up @@ -63,7 +63,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/select_group_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif

Expand Down Expand Up @@ -45,7 +45,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/form/select_remote_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
name="{{ $name }}"
:options="{{ json_encode($values) }}"

@if(old($name, $selected))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif

Expand Down Expand Up @@ -43,7 +43,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:disabled="'{{ $attributes['disabled'] }}'"
@endif

@if(isset($attributes['v-error-message']))
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/form/time_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"

@if(old($name, $value))
@if (isset($value) || old($name))
value="{{ old($name, $value) }}"
@endif

Expand Down

0 comments on commit 4ad2ebf

Please sign in to comment.