{{ $title }}

{{ Form::open(array('route' => $postRoute, 'role' => 'form', 'class' => 'form-horizontal', 'autocomplete' => 'off', 'id' => 'user-form')) }}
@if ($mode == 'edit') {{ Form::hidden('id', $user->id, array('id' => 'id')) }} @endif
{{ Form::text('first_name', isset($user->first_name) ? $user->first_name : null, array('id' => 'first_name')) }} @if (isset($errors) && ($errors->first('first_name') != '' || $errors->first('first_name') != null))

{{ $errors->first('first_name') }}

@endif
{{ Form::text('last_name', isset($user->last_name) ? $user->last_name : null, array('id' => 'last_name')) }} @if (isset($errors) && ($errors->first('last_name') != '' || $errors->first('last_name') != null))

{{ $errors->first('last_name') }}

@endif
{{ Form::text('email', isset($user->email) ? $user->email : null, array()) }} @if (isset($errors) && ($errors->first('email') != '' || $errors->first('email') != null))

{{ $errors->first('email') }}

@endif
@if ($mode == 'add') {{ Form::password('password', array('id' => 'pwd', "autocomplete"=>"new-password")) }} @else {{ Form::password('password', array('id' => 'pwd', "autocomplete"=>"new-password")) }} @endif @if (isset($errors) && ($errors->first('password') != '' || $errors->first('password') != null))

{{ $errors->first('password') }}

@endif
{{ Form::text('address', isset($user->address) ? $user->address : null, array('id' => 'address')) }} @if (isset($errors) && ($errors->first('address') != '' || $errors->first('address') != null))

{{ $errors->first('address') }}

@endif
{{ Form::text('city', isset($user->city) ? $user->city : null, array('id' => 'city')) }} @if (isset($errors) && ($errors->first('city') != '' || $errors->first('city') != null))

{{ $errors->first('city') }}

@endif
{{ Form::text('phone', isset($user->phone) ? $user->phone : null, array('id' => 'phone')) }} @if (isset($errors) && ($errors->first('phone') != '' || $errors->first('phone') != null))

{{ $errors->first('phone') }}

@endif
{{ Form::text('job_title', isset($user->job_title) ? $user->job_title : null, array('id' => 'job_title')) }} @if (isset($errors) && ($errors->first('job_title') != '' || $errors->first('job_title') != null))

{{ $errors->first('job_title') }}

@endif
{{ Form::select('language', $languages, isset($user->language_id) ? $user->language_id : null, array('id' => 'language', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('language') != '' || $errors->first('language') != null))

{{ $errors->first('language') }}

@endif
{{ Form::select('role', $roles, isset($user->role_id) ? $user->role_id : null, array('id' => 'role', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('role') != '' || $errors->first('role') != null))

{{ $errors->first('role') }}

@endif
@if(Session::get('cities_for_user')) {{ Form::select('cities[]', Session::pull('cities_for_user'), null, array('id' => 'cities', 'multiple')) }} @elseif(isset($cities)) {{ Form::select('cities[]', $citiesList, $cities, array('id' => 'cities', 'multiple')) }} @else {{ Form::select('cities[]', [], null, array('id' => 'cities', 'multiple')) }} @endif
{{ Form::text('addCity', null, array('id' => 'add-city', 'class'=>'autocomplete')) }}

{{ Lang::get('user.label_email_is_verified') }}: {{ Form::radio('email_is_verified', 0, $verified_no, ['id'=>'verified-no']) }} {{ Form::radio('email_is_verified', 1, $verified_yes, ['id'=>'verified-yes']) }}

{{ Lang::get('user.label_is_banned') }}: {{ Form::radio('is_banned', 0, $banned_no, ['id'=>'banned-no']) }} {{ Form::radio('is_banned', 1, $banned_yes, ['id'=>'banned-yes']) }}

{{ Lang::get('user.label_is_deleted') }}: {{ Form::radio('is_deleted', 0, $deleted_no, ['id'=>'deleted-no']) }} {{ Form::radio('is_deleted', 1, $deleted_yes, ['id'=>'deleted-yes']) }}

{{ Lang::get('core.cancel') }} {{ Form::button(' ' . Lang::get('core.save'), array('type' => 'submit', 'class' => 'waves-effect waves-light btn btn-primary')) }}
{{ Form::close() }}