Skip to content

Commit

Permalink
fix formSelect options render
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Fanamurov committed Jun 21, 2018
1 parent a8983e0 commit 4f26d91
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions views/admin/formbuilder/select/value.blade.php
Expand Up @@ -11,9 +11,8 @@
<select name="{{ $row_key }}" id="{{ $row_key }}" class="{{ $row_settings->cssClass }} uk-select">
<option></option>
@foreach($row_settings->options as $options_key => $options_value)
@if($row_settings->connect)
@if(\count($row_settings->options) > 0 && isset($options_value->{$row_settings->option_key}))
<option value="@if($row_settings->option_key){{ $options_value->{$row_settings->option_key} }}@else{{ $options_value->{$row_settings->name} }}@endif"
@if($row_settings->connect && \count($row_settings->options) > 0 && $row_settings->connect->relation_name)
<option value="@if($row_settings->option_key){{ $options_value->{$row_settings->option_key} }}@else{{ $options_value->{$row_settings->name} }}@endif"
@if($row_settings->option_key)
@isset($data->{$row_settings->option_key})
@if(Request::old($row_settings->name, $data->{$row_settings->name}) === $options_value->{$row_settings->option_key}) selected @endif
Expand All @@ -23,15 +22,12 @@
@if(Request::old($row_settings->name, $data->{$row_settings->name}) === $options_value->{$row_settings->name}) selected @endif
@endisset
@endif>
@if($row_settings->option_title)
{{ $options_value->{$row_settings->option_title} }}
@else
{{ $options_value->{$row_settings->name} }}
@endif
</option>
@else
<option></option>
@endif
@if($row_settings->option_title)
{{ $options_value->{$row_settings->option_title} }}
@else
{{ $options_value->{$row_settings->name} }}
@endif
</option>
@else
<option value="{{ $options_value }}"
@isset($data->{$row_settings->name})
Expand Down

0 comments on commit 4f26d91

Please sign in to comment.