<script>
    $('#roles-list').select2();
</script>
{!! Form::open(['action'=>['User\UserRolesController@storeAssignRolesToUser', 'id'=>$id], 'id'=>'assign-roles-to-user', 'method'=>'POST']) !!}
<div class="error" style="text-align: center;"><b>On this Window, You can Assign Roles to a User by the Name: {!! $user->firstName." ".$user->lastName !!}</b></div><br>
<div class="guestDetails_inputDivider"></div>
<button type="submit" disabled style="display: none" aria-hidden="true"></button>
<div class="guestDetails_input">
    <div class="guestDetails_inputLabel">
        {!! Form::label('name', 'Select Roles') !!}<i class="error">You can Select Multiple Roles</i><span class="error">*</span>
    </div>
    <div class="guestDetails_input">
        <select multiple="multiple" name="roles[]" id="roles-list" style="width: 450px">
            @if($roles != null)
                @foreach($roles as $row)
                    <option value="{{$row->id}}" @if($user->hasRole($row->name)) disabled @endif>{!! $row->name !!}</option>
                @endforeach
            @endif
        </select>
    </div>
</div>
<div class="guestDetails_inputDivider1"></div>
{!! Form::close() !!}

