{{ $title or null }}

{{ Form::open(array('route' => $postRoute, 'role' => 'form', 'class' => 'form-horizontal', 'autocomplete' => 'off')) }} @if ($mode == 'edit') {{ Form::hidden('id', $company->id, array('id' => 'id')) }} @endif
{{ Form::text('company_name', isset($company->name) ? $company->name : null, array('id' => 'company_name')) }} @if (isset($errors) && ($errors->first('company_name') != '' || $errors->first('company_name') != null))

{{ $errors->first('company_name') }}

@endif
{{ Form::text('company_email', isset($company->email) ? $company->email : null, array('id' => 'company_email')) }} @if (isset($errors) && ($errors->first('company_email') != '' || $errors->first('company_email') != null))

{{ $errors->first('company_email') }}

@endif
{{ Form::text('company_phone_number', isset($company->phone) ? $company->phone : null, array('id' => 'company_phone_number')) }} @if (isset($errors) && ($errors->first('company_phone_number') != '' || $errors->first('company_phone_number') != null))

{{ $errors->first('company_phone_number') }}

@endif
{{ Form::text('company_address', isset($company->address) ? $company->address : null, array('id' => 'company_address')) }} @if (isset($errors) && ($errors->first('company_address') != '' || $errors->first('company_address') != null))

{{ $errors->first('company_address') }}

@endif
@if(Entrust::hasRole('superadmin')) {{ Form::text('city_id', isset($company->city_name) ? $company->city_name : null, array('id' => 'add-city', 'class'=>'autocomplete')) }} @if (isset($errors) && ($errors->first('city_id') != '' || $errors->first('city_id') != null))

{{ $errors->first('city_id') }}

@endif @else {{ Form::text('city', isset($company->city_name) ? $company->city_name : null, array('id' => 'add-city', 'class'=>'autocomplete', 'disabled'=>'disabled')) }} {{ Form::hidden('city_id', isset($company->city_name) ? $company->city_name : null)}} @endif
{{ Form::text('fb_page_id', isset($company->fb_page_id) ? $company->fb_page_id : null, array('id' => 'fb-page-id', 'onkeyup' => 'checkIfFbPageExists()')) }} info_outline @if (isset($errors) && ($errors->first('fb_page_id') != '' || $errors->first('fb_page_id') != null))

{{ $errors->first('fb_page_id') }}

@endif
{{ Form::textarea('company_description', isset($company->description) ? $company->description : null, array('id' => 'company_description', 'class'=>'materialize-textarea')) }} @if (isset($errors) && ($errors->first('company_description') != '' || $errors->first('company_description') != null))

{{ $errors->first('company_description') }}

@endif
  • @if(Session::get('cas')) {{ Form::select('cityAdmins[]', Session::pull('cas'), null, array('id' => 'city-admins', 'multiple')) }} @elseif(isset($cityAdmins)) {{ Form::select('cityAdmins[]', $admins, $cityAdmins, array('id' => 'city-admins', 'multiple')) }} @else {{ Form::select('cityAdmins[]', (Session::get('cas'))?Session::pull('cas'):[], null, array('id' => 'city-admins', 'multiple')) }} @endif
@if (isset($errors) && ($errors->first('cityAdmins') != '' || $errors->first('cityAdmins') != null))

{{ $errors->first('cityAdmins') }}

@endif {{--autoselect for adding existing admins to the city, event listener is in newUser.js--}}
{{ Form::text('addAdmin', null, array('id' => 'add-admin', 'class'=>'autocomplete')) }}
@if(Entrust::hasRole('superadmin') OR Entrust::hasRole('admin')) add @endif
{{ Lang::get('core.cancel') }} {{ Form::button(' ' . Lang::get('core.save'), array('type' => 'submit', 'class' => 'waves-effect waves-light btn btn-primary')) }}
{{ Form::close() }}