{{ $pageTitle ?? __('messages.list') }}
{{ __('messages.back') }} @if($auth_user->can('user list')) @endif
{{ Form::model($customerdata,['method' => 'POST','route'=>'user.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'user'] ) }} {{ Form::hidden('id') }} {{ Form::hidden('user_type','user') }}
{{ Form::label('first_name',__('messages.first_name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('first_name',old('first_name'),['placeholder' => __('messages.first_name'),'class' =>'form-control','required']) }}
{{ Form::label('last_name',__('messages.last_name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('last_name',old('last_name'),['placeholder' => __('messages.last_name'),'class' =>'form-control','required']) }}
{{ Form::label('username',__('messages.username').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('username',old('username'),['placeholder' => __('messages.username'),'class' =>'form-control','required']) }}
@if(auth()->user()->hasAnyRole(['admin','demo_admin']))
{{ Form::label('user_type',__('messages.user_type').' *',['class'=>'form-control-label'], false ) }}
@endif
{{ Form::label('email', __('messages.email').' *', ['class' => 'form-control-label'], false) }} {{ Form::email('email', old('email'), ['placeholder' => __('messages.email'), 'class' => 'form-control', 'required', 'pattern' => '[^@]+@[^@]+\.[a-zA-Z]{2,}', 'title' => 'Please enter a valid email address']) }}
@if (!isset($customerdata->id) || $customerdata->id == null)
{{ Form::label('password', __('messages.password').' *', ['class' => 'form-control-label'], false) }} {{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('messages.password'), 'required', 'autocomplete' => 'new-password']) }}
@endif
{{ Form::label('contact_number',__('messages.contact_number').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('contact_number',old('contact_number'),['placeholder' => __('messages.contact_number'),'class' =>'form-control','required']) }}
{{ Form::label('status',__('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'class' =>'form-control select2js','required']) }}
{{ Form::label('address',__('messages.address'), ['class' => 'form-control-label']) }} {{ Form::textarea('address', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.address') ]) }}
{{ Form::submit( __('messages.save'), ['class'=>'btn btn-md btn-primary float-right']) }} {{ Form::close() }}