Dan Brown

Fixed incorrect role showing

...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @foreach($options as $option) 3 @foreach($options as $option)
4 <option value="{{$option->id}}" 4 <option value="{{$option->id}}"
5 @if($errors->has($name)) class="neg" @endif 5 @if($errors->has($name)) class="neg" @endif
6 - @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->id === $option->id) selected @endif @endif 6 + @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif
7 > 7 >
8 {{ $option->$displayKey }} 8 {{ $option->$displayKey }}
9 </option> 9 </option>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 @if($currentUser->can('user-update')) 19 @if($currentUser->can('user-update'))
20 <div class="form-group"> 20 <div class="form-group">
21 <label for="role">User Role</label> 21 <label for="role">User Role</label>
22 - @include('form/model-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name']) 22 + @include('form.role-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name'])
23 </div> 23 </div>
24 @endif 24 @endif
25 25
......