@extends('header') @section('onReady') $('input#name').focus(); @stop @section('content') {{ Former::open($url)->addClass('col-md-10 col-md-offset-1 main_form')->method($method)->rules(array( 'name' => 'required', 'email' => 'email' )); }} @if ($client) {{ Former::populate($client) }} @endif
{{ Former::legend('Organization') }} {{ Former::text('name') }} {{ Former::text('website') }} {{ Former::text('work_phone')->label('Phone') }} {{ Former::legend('Address') }} {{ Former::text('address1')->label('Street') }} {{ Former::text('address2')->label('Apt/Floor') }} {{ Former::text('city') }} {{ Former::text('state') }} {{ Former::text('postal_code') }} {{ Former::select('country_id')->addOption('','')->label('Country') ->fromQuery($countries, 'name', 'id')->select($client ? $client->country_id : '') }}
{{ Former::legend('Contacts') }}
{{ Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") }} {{ Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") }} {{ Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") }} {{ Former::text('email')->data_bind("value: email, valueUpdate: 'afterkeydown'") }} {{ Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") }}
{{ link_to('#', 'Remove contact', array('data-bind'=>'click: $parent.removeContact')) }} {{ link_to('#', 'Add contact', array('onclick'=>'return addContact()')) }}
{{ Former::legend('Additional Info') }} {{ Former::select('client_size_id')->addOption('','')->label('Size') ->fromQuery($clientSizes, 'name', 'id')->select($client ? $client->client_size_id : '') }} {{ Former::select('client_industry_id')->addOption('','')->label('Industry') ->fromQuery($clientIndustries, 'name', 'id')->select($client ? $client->client_industry_id : '') }} {{ Former::textarea('notes') }}
{{ Former::hidden('data')->data_bind("value: ko.toJSON(model)") }}
{{ Button::lg_primary_submit('Save') }}  |  {{ link_to('clients/' . ($client ? $client->public_id : ''), 'Cancel') }}
{{ Former::close() }} @stop