@extends('layouts.master') @section('title') {{translate('edit guarantor')}} @endsection @section('content')
{{translate('edit guarantor')}}
{!! Form::open(array('url' => url('guarantor/'.$guarantor->id.'/update'), 'method' => 'post', 'name' => 'form',"enctype"=>"multipart/form-data")) !!}

{{translate('required field')}}

{!! Form::label('first_name',translate('first_name'),array('class'=>'')) !!} {!! Form::text('first_name',$guarantor->first_name, array('class' => 'form-control', 'placeholder'=>translate('first_name'),'required'=>'required')) !!}
{!! Form::label('last_name',translate('last_name'),array('class'=>'')) !!} {!! Form::text('last_name',$guarantor->last_name, array('class' => 'form-control', 'placeholder'=>translate('last_name'),'required'=>'required')) !!}
{!! Form::label('gender',translate('gender'),array('class'=>'')) !!} {!! Form::select('gender',array('Male'=>translate('Male'),'Female'=>translate('Female')),$guarantor->gender, array('class' => 'form-control','required'=>'required')) !!}
{!! Form::label('id_card_number',translate('id_card_number'),array('class'=>'')) !!} {!! Form::text('id_card_number',$guarantor->id_card_number, array('class' => 'form-control', 'placeholder'=>translate('id_card_number'),'required'=>'required')) !!}
{!! Form::label('country',translate('country'),array('class'=>'')) !!} {!! Form::select('country_id',$countries,$guarantor->country_id,array('class'=>'form-control select2','placeholder'=>'','required'=>'required')) !!}

{{translate('optional field')}}

{!! Form::label('title',translate('title'),array('class'=>'')) !!} {!! Form::select('title',array('Mr'=>translate('Mr'),'Mrs'=>translate('Mrs'), 'Miss'=>translate('Miss'),'Ms'=>translate('Ms'),'Dr'=>translate('Dr'),'Prof'=>translate('Prof'),'Rev'=>translate('Rev')),$guarantor->title, array('class' => 'form-control',)) !!}
{!! Form::label('mobile',translate('mobile'),array('class'=>'')) !!} {!! Form::text('mobile',$guarantor->mobile, array('class' => 'form-control', 'placeholder'=>translate('numbers_only'))) !!}
{!! Form::label('email',translate('email'),array('class'=>'')) !!} {!! Form::text('email',$guarantor->email, array('class' => 'form-control', 'placeholder'=>translate('email'))) !!}
{!! Form::label('unique_number',translate('unique_number'),array('class'=>'')) !!} {!! Form::text('unique_number',$guarantor->unique_number, array('class' => 'form-control', 'placeholder'=>translate('unique_number'))) !!}
{!! Form::label('dob',translate('dob'),array('class'=>'')) !!} {!! Form::text('dob',$guarantor->dob, array('class' => 'form-control date-picker', 'placeholder'=>translate('dob'))) !!}
{!! Form::label('address',translate('address'),array('class'=>'')) !!} {!! Form::text('address',$guarantor->address, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('city',translate('city'),array('class'=>'')) !!} {!! Form::text('city',$guarantor->city, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('state',translate('state'),array('class'=>'')) !!} {!! Form::text('state',$guarantor->state, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('zip',translate('zip'),array('class'=>'')) !!} {!! Form::text('zip',$guarantor->zip, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('phone',translate('phone'),array('class'=>'')) !!} {!! Form::text('phone',$guarantor->phone, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('business_name',translate('business'),array('class'=>'')) !!} {!! Form::text('business_name',$guarantor->business_name, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('working_status',translate('working_status'),array('class'=>'')) !!} {!! Form::select('working_status',array('Employee'=>translate('Employee'),'Owner'=>translate('Owner'),'Student'=>translate('Student'),'Overseas Worker'=>translate('Overseas Worker'),'Pensioner'=>translate('Pensioner'),'Unemployed'=>translate('Unemployed')),$guarantor->working_status, array('class' => 'form-control')) !!}
{!! Form::label('photo',translate('photo'),array('class'=>'')) !!} {!! Form::file('photo', array('class' => 'form-control', 'placeholder'=>"")) !!} @if(!empty($guarantor->photo)) @endif
{!! Form::label('notes',translate('description'),array('class'=>'')) !!} {!! Form::textarea('notes',$guarantor->notes, array('class' => 'form-control', 'placeholder'=>"")) !!}
{!! Form::label('files',translate('file'). ' '.translate('borrower_file_types'),array('class'=>'')) !!} {!! Form::file('files[]', array('class' => 'form-control', 'multiple'=>"")) !!}
{{translate('select_thirty_files')}}
@foreach(unserialize($guarantor->files) as $key=>$value) {!! $value!!}
@endforeach

{{translate('custom_field')}}

@foreach($custom_fields as $key)
{!! Form::label($key->id,$key->name,array('class'=>'')) !!} @if($key->field_type=="number") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first()->name}} @endif"> @endif @if($key->field_type=="textfield") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first()->name}} @endif"> @endif @if($key->field_type=="date") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first()->name}} @endif"> @endif @if($key->field_type=="textarea") @endif @if($key->field_type=="decimal") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$guarantor->id)->where('category','borrowers')->first()->name}} @endif"> @endif
@endforeach

Click here to add custom fields on this page

{!! Form::close() !!}
@endsection @section('footer-scripts') @endsection