@if (isset($lead)) {!! Form::model($lead, array('url' => $type . '/' . $lead->id, 'method' => 'put', 'files'=> true)) !!} @else {!! Form::open(array('url' => $type, 'method' => 'post', 'files'=> true)) !!} @endif
{!! Form::label('opportunity', trans('lead.opportunity'), array('class' => 'control-label required')) !!}
{!! Form::text('opportunity', null, array('class' => 'form-control')) !!} {{ $errors->first('opportunity', ':message') }}
{!! Form::label('company_name', trans('lead.company_name'), array('class' => 'control-label')) !!}
{!! Form::text('company_name', null, array('class' => 'form-control')) !!} {{ $errors->first('company_name', ':message') }}
{!! Form::label('address', trans('lead.address'), array('class' => 'control-label')) !!}
{!! Form::textarea('address', null, array('class' => 'form-control')) !!} {{ $errors->first('address', ':message') }}
{!! Form::label('company_id', trans('lead.customer'), array('class' => 'control-label')) !!}
{!! Form::select('customer_id', $companies, null, array('id'=>'customer_id', 'class' => 'form-control select2')) !!} {{ $errors->first('customer_id', ':message') }}
{!! Form::label('country_id', trans('lead.country'), array('class' => 'control-label required')) !!}
{!! Form::select('country_id', $countries, null, array('id'=>'country_id', 'class' => 'form-control select2')) !!} {{ $errors->first('country_id', ':message') }}
{!! Form::label('state_id', trans('lead.state'), array('class' => 'control-label')) !!}
{!! Form::select('state_id', isset($lead)?$states:array(0=>trans('lead.select_state')), null, array('id'=>'state_id', 'class' => 'form-control select2')) !!} {{ $errors->first('state_id', ':message') }}
{!! Form::label('city_id', trans('lead.city'), array('class' => 'control-label')) !!}
{!! Form::select('city_id', isset($lead)?$cities:array(0=>trans('lead.select_city')), null, array('id'=>'city_id', 'class' => 'form-control select2')) !!} {{ $errors->first('city_id', ':message') }}
{!! Form::label('sales_person_id', trans('lead.salesperson'), array('class' => 'control-label')) !!}
{!! Form::select('sales_person_id', $staffs, null, array('id'=>'sales_person_id', 'class' => 'form-control select2')) !!} {{ $errors->first('sales_person_id', ':message') }}
{!! Form::label('sales_team_id', trans('lead.sales_team'), array('class' => 'control-label required')) !!}
{!! Form::select('sales_team_id', $salesteams, null, array('id'=>'sales_team_id', 'class' => 'form-control select2')) !!} {{ $errors->first('sales_team_id', ':message') }}
{!! Form::label('contact_name', trans('lead.contact_name'), array('class' => 'control-label required')) !!}
{!! Form::text('contact_name', null, array('class' => 'form-control')) !!} {{ $errors->first('contact_name', ':message') }}
{!! Form::label('title', trans('lead.title'), array('class' => 'control-label')) !!}
{!! Form::select('title', $titles, null, array('id'=>'title', 'class' => 'form-control select2')) !!} {{ $errors->first('title', ':message') }}
{!! Form::label('email', trans('lead.email'), array('class' => 'control-label required')) !!}
{!! Form::email('email', null, array('class' => 'form-control')) !!} {{ $errors->first('email', ':message') }}
{!! Form::label('function', trans('lead.function'), array('class' => 'control-label required')) !!}
{!! Form::text('function', null, array('class' => 'form-control')) !!} {{ $errors->first('function', ':message') }}
{!! Form::label('phone', trans('lead.phone'), array('class' => 'control-label required')) !!}
{!! Form::text('phone', null, array('class' => 'form-control','data-fv-integer' => "true")) !!} {{ $errors->first('phone', ':message') }}
{!! Form::label('mobile', trans('lead.mobile'), array('class' => 'control-label')) !!}
{!! Form::text('mobile', null, array('class' => 'form-control','data-fv-integer' => 'true')) !!} {{ $errors->first('mobile', ':message') }}
{!! Form::label('fax', trans('lead.fax'), array('class' => 'control-label')) !!}
{!! Form::text('fax', null, array('class' => 'form-control','data-fv-integer' => 'true')) !!} {{ $errors->first('fax', ':message') }}
{!! Form::label('priority', trans('lead.priority'), array('class' => 'control-label')) !!}
{!! Form::select('priority', $priority, null, array('id'=>'priority','class' => 'form-control select2')) !!} {{ $errors->first('priority', ':message') }}
{!! Form::label('tags', trans('lead.tags'), array('class' => 'control-label')) !!}
{!! Form::select('tags[]', $tags, (isset($lead)?explode(',',$lead->tags):null), array('id'=>'tags','multiple'=>true, 'class' => 'form-control select2')) !!} {{ $errors->first('tags', ':message') }}
{!! Form::label('internal_notes', trans('lead.internal_notes'), array('class' => 'control-label')) !!}
{!! Form::textarea('internal_notes', null, array('class' => 'form-control')) !!} {{ $errors->first('internal_notes', ':message') }}
{{trans('table.back')}}
{!! Form::close() !!}
@section('scripts') @endsection