@extends('layouts.master') @section('title', 'Edit User') @section('links') @endsection @section('content')

{!! trans('messages.edit') !!} {!! trans('messages.admin') !!}

@if(Entrust::can('edit-user')) {!! Form::model($user,['method' => 'PATCH','route' => ['users.update',$user->id] ,'class' => 'user-form ']) !!}
{!! Form::label('first_name',trans('messages.first_name'),['class' => 'control-label'])!!} {!! Form::input('text','first_name',isset($user->first_name) ? $user->first_name : '',['class'=>'form-control','placeholder'=>trans('messages.first_name')])!!}
{!! Form::label('last_name',trans('messages.last_name'),['class' => 'control-label'])!!} {!! Form::input('text','last_name',isset($user->last_name) ? $user->last_name : '',['class'=>'form-control','placeholder'=>trans('messages.last_name')])!!}
{!! Form::label('username',trans('messages.username'),['class' => 'control-label'])!!} {!! Form::input('text','username',isset($user->username) ? $user->username : '',['class'=>'form-control','placeholder'=>trans('messages.username')])!!}
@if(Entrust::can('edit-user'))
{!! Form::label('role_id',trans('messages.role'),['class' => 'control-label'])!!} {!! Form::select('role_id', $roles, isset($role_id) ? $role_id : '',['class'=>'form-control input-xlarge select2me','placeholder'=>trans('messages.role')])!!}
@endif
{!! Form::label('email',trans('messages.email'),['class' => 'control-label'])!!} {!! Form::input('text','email',isset($user->email) ? $user->email : '',['class'=>'form-control','placeholder'=>trans('messages.email')])!!}
{!! Form::label('mobile',trans('messages.mobile'),['class' => 'control-label'])!!} {!! Form::input('text','mobile',isset($user->mobile) ? $user->mobile : '',['class'=>'form-control','placeholder'=>trans('messages.mobile')])!!}
{!! Form::label('gender',trans('messages.gender'),['class' => 'control-label'])!!} {!! Form::select('gender', $gender,($user->Profile->gender) ? :'',['class'=>'form-control input-xlarge select2me','placeholder'=>trans('messages.select_one')])!!}
@if($role_id!=1)
{!! Form::label('package_id',trans('organisation'),['class' => 'control-label'])!!} {!! Form::select('package_id',$packages, isset($user->package) ? $user->package : '',['class'=>'form-control input-xlarge select2me','placeholder'=>trans('messages.select_one')])!!}
@endif @if(Entrust::hasRole(DEFAULT_ROLE))
{!! Form::label('password',trans('messages.password'),['class' => 'control-label'])!!} {!! Form::input('password','password','',['class'=>'form-control','placeholder'=>trans('messages.password')])!!}
{!! Form::label('password_confirmation',trans('messages.confirm_password'),['class' => 'control-label'])!!} {!! Form::input('password','password_confirmation','',['class'=>'form-control','placeholder'=>trans('messages.confirm_password')])!!}
@endif
{{ App\Classes\Helper::getCustomFields('employee-form',$custom_field_values) }}
{!! Form::submit(isset($buttonText) ? $buttonText : trans('messages.update'),['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @endif
@endsection @section('scripts') @endsection