{{-- CityHub - Add / edit company --}}

{{ $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', 'class' => 'form-control')) }} @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', 'class' => 'form-control')) }} @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', 'class' => 'form-control')) }} @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', 'class' => 'form-control')) }} @if (isset($errors) && ($errors->first('company_address') != '' || $errors->first('company_address') != null))

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

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

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

@endif
{{ Form::text('fb_page_id', isset($company->fb_page_id) ? $company->fb_page_id : null, array('id' => 'fb-page-id', 'class' => 'form-control', 'onkeyup' => 'checkIfFbPageExists()')) }}
@if (isset($errors) && ($errors->first('fb_page_id') != '' || $errors->first('fb_page_id') != null))

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

@endif

{{ Form::select('city_id', $cities, isset($company) ? $company->city_id : null, array('id' => 'city_id', 'class' => 'form-control', 'data-live-search' => 'true', 'data-size' => '5')) }} @if (isset($errors) && ($errors->first('city_id') != '' || $errors->first('city_id') != null))

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

@endif
@if (isset($errors) && ($errors->first('managers') != '' || $errors->first('managers') != null))

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

@endif
{{ Lang::get('core.cancel') }} {{ Form::button(' ' . Lang::get('user.title_add_user'), array('type' => 'button', 'class' => 'btn btn-info', 'onclick'=>"getNewUser()" )) }} {{ Form::button(' ' . Lang::get('core.save'), array('type' => 'submit', 'class' => 'btn btn-success')) }}
{{ Form::close() }}