@php $event_types = ['event1' => 'Event 1', 'event2' => 'Event 2'] @endphp
{!! Form::open(['url' => action('ContactController@update', [$contact->id]), 'method' => 'PUT', 'id' => 'contact_edit_form']) !!}

@lang('contact.edit_contact')

{!! Form::label('status', 'Contact Status' . ':*') !!}
{!! Form::hidden('status', 0, null); !!} {!! Form::checkbox('status', 1, $contact->status , [ 'class' => 'input-icheck']); !!} {{ __( 'Active Contact' ) }}
{!! Form::label('type', __('contact.contact_type') . ':*' ) !!}
{!! Form::select('type', $types, $contact->type, ['class' => 'form-control', 'id' => 'contact_type','placeholder' => __('messages.please_select'), 'required']); !!}
{!! Form::label('name', __('contact.name') . ':*') !!}
{!! Form::text('name', $contact->name, ['class' => 'form-control','placeholder' => __('contact.name'), 'required']); !!}
{!! Form::label('image', __('contact.image') . ':*') !!}
{!! Form::file('image', ['accept' => 'image/*']); !!}
{!! Form::label('supplier_business_name', __('business.business_name') . ':*') !!}
{!! Form::text('supplier_business_name', $contact->supplier_business_name, ['class' => 'form-control', 'required', 'placeholder' => __('business.business_name')]); !!}
{!! Form::label('search_code', __('contact.search.code') . ':*') !!}
{!! Form::text('search_code', $contact->search_code, ['class' => 'form-control', 'required', 'placeholder' => __('contact.search.code')]); !!}
{!! Form::label('contact_id', __('lang_v1.contact_id') . ':') !!}
{!! Form::text('contact_id', $contact->contact_id, ['class' => 'form-control','placeholder' => __('lang_v1.contact_id')]); !!}
{!! Form::label('tax_number', __('contact.tax_no') . ':') !!}
{!! Form::text('tax_number', $contact->tax_number, ['class' => 'form-control', 'placeholder' => __('contact.tax_no')]); !!}
{!! Form::label('opening_balance', __('lang_v1.opening_balance') . ':') !!}
{!! Form::text('opening_balance', $opening_balance, ['class' => 'form-control input_number']); !!}
{!! Form::label('dob', __('Date Of Birth') . ':*') !!}
{!! Form::text('dob', date('m/d/Y', strtotime($contact->dob)), ['class' => 'form-control', 'readonly', 'required', 'id' => 'dob_date']); !!}
{!! Form::label('pay_term_number', __('contact.pay_term') . '*:') !!} @show_tooltip(__('tooltip.pay_term'))
{!! Form::number('pay_term_number', $contact->pay_term_number, ['class' => 'form-control', 'required', 'placeholder' => __('contact.pay_term') ]); !!}
{!! Form::label('pay_term_type', __('contact.pay_term_period') . '*:') !!}
{!! Form::select('pay_term_type', ['months' => __('lang_v1.months'), 'days' => __('lang_v1.days')], $contact->pay_term_type, ['class' => 'form-control','placeholder' => __('messages.please_select'), 'required']); !!}
{!! Form::label('customer_group_id', __('lang_v1.customer_group') . ':') !!}
{!! Form::select('customer_group_id', $customer_groups, $contact->customer_group_id, ['class' => 'form-control']); !!}
{!! Form::label('credit_limit', __('lang_v1.credit_limit') . ':') !!}
{!! Form::text('credit_limit', $contact->credit_limit, ['class' => 'form-control input_number']); !!}

@lang('lang_v1.credit_limit_help')

{!! Form::label('event_type', __('contact.event_type') . ':') !!}
{!! Form::select('event_type', $event_types, $contact->event_type , ['class' => 'form-control', 'id' => 'contact_type','placeholder' => __('contact.event_type')]); !!}
{!! Form::label('is_loyalty', __('contact.loyalty') . ':') !!}
{!! Form::checkbox('is_loyalty', 1, $contact->is_loyalty , [ 'class' => 'input-icheck']); !!} {{ __('contact.loyalty')}}

{!! Form::label('email', __('business.email') . ':') !!}
{!! Form::email('email', $contact->email, ['class' => 'form-control','placeholder' => __('business.email')]); !!}
{!! Form::label('mobile', __('contact.mobile') . ':*') !!}
{!! Form::text('mobile', $contact->mobile, ['class' => 'form-control', 'required', 'placeholder' => __('contact.mobile'), 'pattern'=>"\d{10}"]); !!}
{!! Form::label('alternate_number', __('contact.alternate_contact_number') . ':') !!}
{!! Form::text('alternate_number', $contact->alternate_number, ['class' => 'form-control', 'placeholder' => __('contact.alternate_contact_number'), 'pattern'=>"\d{10}"]); !!}
{!! Form::label('landline', __('contact.landline') . ':') !!}
{!! Form::text('landline', $contact->landline, ['class' => 'form-control', 'placeholder' => __('contact.landline'), 'pattern'=>"\d{10}"]); !!}
{!! Form::label('city', __('business.city') . ':') !!}
{!! Form::text('city', $contact->city, ['class' => 'form-control', 'placeholder' => __('business.city')]); !!}
{!! Form::label('state', __('business.state') . ':') !!}
{!! Form::text('state', $contact->state, ['class' => 'form-control', 'placeholder' => __('business.state')]); !!}
{!! Form::label('country', __('business.country') . ':') !!}
{!! Form::text('country', $contact->country, ['class' => 'form-control', 'placeholder' => __('business.country')]); !!}
{!! Form::label('zipcode', __('contact.zipcode') . ':') !!}
{!! Form::text('zipcode', $contact->zipcode, ['class' => 'form-control', 'placeholder' => __('contact.zipcode')]); !!}
{!! Form::label('landmark', __('business.landmark') . ':') !!}
{!! Form::text('landmark', $contact->landmark, ['class' => 'form-control', 'placeholder' => __('business.landmark')]); !!}
{!! Form::label('fax_no', __('contact.faxno') . ':') !!}
{!! Form::text('fax_no', $contact->fax_no, ['class' => 'form-control', 'placeholder' => __('contact.faxno'), 'pattern'=>"\d{10}"]); !!}
{!! Form::label('website', __('contact.website') . ':') !!}
{!! Form::text('website', $contact->website, ['class' => 'form-control', 'placeholder' => __('contact.website')]); !!}
{!! Form::label('vat_no', __('contact.vatno') . ':') !!}
{!! Form::text('vat_no', $contact->vat_no, ['class' => 'form-control', 'placeholder' => __('contact.vatno')]); !!}
{!! Form::label('tin_no', __('contact.tinno') . ':') !!}
{!! Form::text('tin_no', $contact->tin_no, ['class' => 'form-control', 'placeholder' => __('contact.tinno')]); !!}
{!! Form::label('bank_account_id', __('contact.bank_account') . ':') !!}
{!! Form::select('bank_account_id', $bank_accounts, $contact->bank_account_id, ['class' => 'form-control', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::close() !!}