1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 23:52:40 +01:00
BookStack/resources/views/form/role-select.blade.php
2015-08-31 11:59:10 +01:00

15 lines
570 B
PHP

<select id="{{ $name }}" name="{{ $name }}">
@foreach($options as $option)
<option value="{{$option->id}}"
@if($errors->has($name)) class="neg" @endif
@if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif
>
{{ $option->$displayKey }}
</option>
@endforeach
</select>
@if($errors->has($name))
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
@endif