@if (isset($company)) {!! Form::model($company, array('url' => $type . '/' . $company->id, 'method' => 'put', 'files'=> true)) !!} @else {!! Form::open(array('url' => $type, 'method' => 'post', 'files'=> true)) !!} @endif
{!! Form::label('name', trans('company.company_name'), array('class' => 'control-label required')) !!}
{!! Form::text('name', null, array('class' => 'form-control')) !!} {{ $errors->first('name', ':message') }}
{!! Form::label('website', trans('company.website'), array('class' => 'control-label')) !!}
{!! Form::text('website', null, array('class' => 'form-control')) !!} {{ $errors->first('website', ':message') }}
{!! Form::label('address', trans('company.address'), array('class' => 'control-label required')) !!}
{!! Form::textarea('address', null, array('class' => 'form-control')) !!} {{ $errors->first('address', ':message') }}
{!! Form::label('phone', trans('company.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('company.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('company.fax'), array('class' => 'control-label')) !!}
{!! Form::text('fax', null, array('class' => 'form-control','data-fv-integer' => "true")) !!} {{ $errors->first('fax', ':message') }}
{!! Form::label('country_id', trans('company.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('company.state'), array('class' => 'control-label required')) !!}
{!! Form::select('state_id', isset($company)?$states:array(0=>trans('company.select_state')), null, array('id'=>'state_id', 'class' => 'form-control select2')) !!} {{ $errors->first('state_id', ':message') }}
{!! Form::label('city_id', trans('company.city'), array('class' => 'control-label required')) !!}
{!! Form::select('city_id', isset($company)?$cities:array(0=>trans('company.select_city')), null, array('id'=>'city_id', 'class' => 'form-control select2')) !!} {{ $errors->first('city_id', ':message') }}
{!! Form::hidden('latitude', null, array('class' => 'form-control', 'id'=>"latitude")) !!} {!! Form::hidden('longitude', null, array('class' => 'form-control', 'id'=>"longitude")) !!}
{!! Form::label('main_contact_person', trans('company.main_contact_person'), array('class' => 'control-label required')) !!}
{!! Form::select('main_contact_person', $customers, null, array('id'=>'main_contact_person', 'class' => 'form-control select2')) !!} {{ $errors->first('main_contact_person', ':message') }}
{!! Form::label('sales_team_id', trans('company.sales_team_id'), 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('email', trans('company.email'), array('class' => 'control-label required')) !!}
{!! Form::email('email', null, array('class' => 'form-control')) !!} {{ $errors->first('email', ':message') }}
{!! Form::label('company_avatar_file', trans('company.company_avatar'), array('class' => 'control-label required')) !!}
@if(isset($company->company_avatar) && $company->company_avatar!="") Image @endif
{{trans('dashboard.select_image')}} {{trans('dashboard.change')}} {{trans('dashboard.remove')}}
{{ $errors->first('company_avatar_file', ':message') }}
{{trans('table.back')}}
{!! Form::close() !!}
@section('scripts') @endsection