{{ Form::model($handymandata,['method' => 'POST','route'=>'handyman.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'handyman'] ) }}
{{ Form::hidden('id') }}
{{ Form::hidden('user_type','handyman') }}
{{ 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']) }}
{{ 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($handymandata->id) || $handymandata->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('handymantype_id', __('messages.select_name',[ 'select' => __('messages.handymantype') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('handymantype_id', [optional($handymandata->handymantype)->id => optional($handymandata->handymantype)->name], optional($handymandata->handymantype)->id, [
'class' => 'select2js form-group handymantype',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.handymantype') ]),
'data-ajax--url' => route('ajax-list', ['type' => 'handymantype']),
]) }}
@if(auth()->user()->hasAnyRole(['admin','demo_admin']))
{{ Form::label('provider_id', __('messages.select_name',[ 'select' => __('messages.providers') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('provider_id', [optional($handymandata->providers)->id => optional($handymandata->providers)->display_name], optional($handymandata->providers)->id, [
'class' => 'select2js form-group providers',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.providers') ]),
'data-ajax--url' => route('ajax-list', ['type' => 'provider']),
]) }}
@endif
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.provider_address') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('service_address_id', [], old('service_address_id'), [
'class' => 'select2js form-group service_address_id',
'id' =>'service_address_id',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.provider_address') ]),
]) }}
{{ Form::label('country_id', __('messages.select_name',[ 'select' => __('messages.country') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('country_id', [optional($handymandata->country)->id => optional($handymandata->country)->name], optional($handymandata->country)->id, [
'class' => 'select2js form-group country',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.country') ]),
'data-ajax--url' => route('ajax-list', ['type' => 'country']),
]) }}
{{ Form::label('state_id', __('messages.select_name',[ 'select' => __('messages.state') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('state_id', [], [
'class' => 'select2js form-group state_id',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.state') ]),
]) }}
{{ Form::label('city_id', __('messages.select_name',[ 'select' => __('messages.city') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('city_id', [], old('city_id'), [
'class' => 'select2js form-group city_id',
'required',
'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.city') ]),
]) }}
{{ 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 contact_number',
//'maxlength' => 20, // Maximum 20 characters allowed
//'pattern' => '^(\+|-)?\d+$', // Accepts '+' and numeric characters only
'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']) }}
@if(getMediaFileExit($handymandata, 'profile_image'))
@endif
{{ 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() }}