@if (isset($opportunity)) {!! Form::model($opportunity, array('url' => $type . '/' . $opportunity->id, 'method' => 'put', 'files'=> true)) !!} @else {!! Form::open(array('url' => $type, 'method' => 'post', 'files'=> true)) !!} @endif
{!! Form::label('opportunity', trans('opportunity.opportunity'), array('class' => 'control-label required')) !!}
{!! Form::text('opportunity', null, array('class' => 'form-control')) !!} {{ $errors->first('opportunity', ':message') }}
{!! Form::label('stages', trans('opportunity.stages'), array('class' => 'control-label required')) !!}
{!! Form::select('stages', $stages, null, array('id'=>'stages', 'class' => 'form-control select2')) !!} {{ $errors->first('stages', ':message') }}
{!! Form::label('expected_revenue', trans('opportunity.expected_revenue'), array('class' => 'control-label required')) !!}
{!! Form::text('expected_revenue', null, array('class' => 'form-control')) !!} {{ $errors->first('expected_revenue', ':message') }}
{!! Form::label('probability', trans('opportunity.probability'), array('class' => 'control-label required')) !!}
{!! Form::number('probability', null, array('class' => 'form-control')) !!} {{ $errors->first('probability', ':message') }}
{!! Form::label('customer_id', trans('opportunity.customer'), array('class' => 'control-label required')) !!}
{!! Form::select('customer_id', $companies, null, array('id'=>'customer_id', 'class' => 'form-control select2')) !!} {{ $errors->first('customer_id', ':message') }}
{!! Form::label('email', trans('opportunity.email'), array('class' => 'control-label required')) !!}
{!! Form::email('email', null, array('class' => 'form-control')) !!} {{ $errors->first('email', ':message') }}
{!! Form::label('phone', trans('opportunity.phone'), array('class' => 'control-label required')) !!}
{!! Form::text('phone', null, array('class' => 'form-control','data-fv-integer' => "true")) !!} {{ $errors->first('phone', ':message') }}
{!! Form::label('sales_person_id', trans('opportunity.salesperson'), array('class' => 'control-label required')) !!}
{!! 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('opportunity.salesteam'), 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('next_action', trans('opportunity.next_action'), array('class' => 'control-label required')) !!}
{!! Form::text('next_action', null, array('class' => 'form-control date')) !!} {{ $errors->first('next_action', ':message') }}
{!! Form::label('next_action_title', trans('opportunity.next_action_title'), array('class' => 'control-label required')) !!}
{!! Form::text('next_action_title', null, array('class' => 'form-control')) !!} {{ $errors->first('next_action_title', ':message') }}
{!! Form::label('expected_closing', trans('opportunity.expected_closing'), array('class' => 'control-label required')) !!}
{!! Form::text('expected_closing', null, array('class' => 'form-control date')) !!} {{ $errors->first('expected_closing', ':message') }}
{!! Form::label('priority', trans('opportunity.priority'), array('class' => 'control-label required')) !!}
{!! Form::select('priority', $priority, null, array('id'=>'priority','class' => 'form-control select2')) !!} {{ $errors->first('priority', ':message') }}
{!! Form::label('tags', trans('opportunity.tags'), array('class' => 'control-label')) !!}
{!! Form::select('tags[]', $tags, (isset($opportunity)?explode(',',$opportunity->tags):null), array('id'=>'tags','multiple'=>true, 'class' => 'form-control select2')) !!} {{ $errors->first('tags', ':message') }}
{!! Form::label('assigned_partner_id', trans('opportunity.assigned_partner_id'), array('class' => 'control-label')) !!}
{!! Form::select('assigned_partner_id', $companies, null, array('id'=>'assigned_partner_id', 'class' => 'form-control select2')) !!} {{ $errors->first('assigned_partner_id', ':message') }}
{!! Form::label('internal_notes', trans('opportunity.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') @if (!isset($opportunity)) @endif @endsection