@extends('header') @section('onReady') $('input#name').focus(); @stop @section('content')
{!! Former::open($url)->addClass('col-md-12 warn-on-exit')->method($method) !!} @if ($client) {!! Former::populate($client) !!} @endif

{!! trans('texts.organization') !!}

{!! Former::text('name')->data_bind("attr { placeholder: placeholderName }") !!} {!! Former::text('id_number') !!} {!! Former::text('vat_number') !!} {!! Former::text('website') !!} {!! Former::text('work_phone') !!} @if (Auth::user()->isPro()) @if ($customLabel1) {!! Former::text('custom_value1')->label($customLabel1) !!} @endif @if ($customLabel2) {!! Former::text('custom_value2')->label($customLabel2) !!} @endif @endif

{!! trans('texts.address') !!}

{!! Former::text('address1') !!} {!! Former::text('address2') !!} {!! Former::text('city') !!} {!! Former::text('state') !!} {!! Former::text('postal_code') !!} {!! Former::select('country_id')->addOption('','') ->fromQuery($countries, 'name', 'id') !!}

{!! trans('texts.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\', attr: {id:\'email\'+$index()}') !!} {!! Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") !!}
{!! link_to('#', trans('texts.remove_contact').' -', array('data-bind'=>'click: $parent.removeContact')) !!} {!! link_to('#', trans('texts.add_contact').' +', array('onclick'=>'return addContact()')) !!}

{!! trans('texts.additional_info') !!}

{!! Former::select('currency_id')->addOption('','') ->fromQuery($currencies, 'name', 'id') !!} {!! Former::select('payment_terms')->addOption('','') ->fromQuery($paymentTerms, 'name', 'num_days') !!} {!! Former::select('size_id')->addOption('','') ->fromQuery($sizes, 'name', 'id') !!} {!! Former::select('industry_id')->addOption('','') ->fromQuery($industries, 'name', 'id') !!} {!! Former::textarea('private_notes') !!}
{!! Former::hidden('data')->data_bind("value: ko.toJSON(model)") !!}
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!} {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/clients/' . ($client ? $client->public_id : '')))->appendIcon(Icon::create('remove-circle')) !!}
{!! Former::close() !!}
@stop