2018-08-31 14:47:04 +00:00
|
|
|
@extends('settings.layouts.app')
|
2018-08-06 12:30:51 +00:00
|
|
|
|
|
|
|
@section('content')
|
2018-08-29 15:18:15 +00:00
|
|
|
<div class="header">
|
|
|
|
<h3 class="header-title">
|
|
|
|
<span>Edit {{ $user->login }}</span>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<div class="pure-g box-content">
|
|
|
|
<div class="pure-u-1 pure-u-md-2-3">
|
2018-08-06 12:30:51 +00:00
|
|
|
<div>
|
2018-08-31 14:47:04 +00:00
|
|
|
<a href="{{ route('settings.user.index') }}" class="pure-button button-small">
|
2018-08-06 12:30:51 +00:00
|
|
|
<i class="fa fa-chevron-left"></i>
|
|
|
|
<span>BACK</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (count($errors) > 0)
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
|
|
|
<ul>
|
|
|
|
@foreach ($errors->all() as $error)
|
|
|
|
<li>{{ $error }}</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div>
|
2018-08-31 14:47:04 +00:00
|
|
|
{!! Form::model($user, ['method' => 'PATCH','route' => ['settings.user.update', $user->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<fieldset>
|
|
|
|
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
|
|
|
<label>Login:</label>
|
|
|
|
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
|
|
|
<em>*</em>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
|
|
|
<label>Email:</label>
|
|
|
|
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
|
|
|
<em>*</em>
|
|
|
|
</div>
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
|
|
|
<label>Password:</label>
|
|
|
|
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
|
|
|
<em>*</em>
|
|
|
|
</div>
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
|
|
|
<label>Confirm Password:</label>
|
|
|
|
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
|
|
|
<em>*</em>
|
|
|
|
</div>
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<h5><b>Assign Roles</b></h5>
|
|
|
|
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
|
|
|
<!-- <label for="Roles">Assign Roles</label>-->
|
2018-08-06 12:30:51 +00:00
|
|
|
|
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
@foreach ($roles as $role)
|
2018-08-06 12:30:51 +00:00
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
<label for={{"role". $role->id }} class="pure-checkbox">
|
|
|
|
<input name="roles[]" value={{ $role->id }} {{ (in_array($role->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
|
|
|
{{ $role->name }}
|
|
|
|
</label>
|
|
|
|
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="submit" class="pure-button button-small">Save</button>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
2018-08-06 12:30:51 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-u-1 pure-u-md-1-3">
|
|
|
|
<div class="sidebar">
|
|
|
|
@foreach ($user->roles as $role)
|
|
|
|
<p>role: {{ $role->name }}</p>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endsection
|