@extends('admin.layouts.master') @section('title') @if(!$edit_mode) New Customer @else Edit Customer: {{ $customer->phone }} - {{ $customer->first_name }} - {{ $customer->last_name }} @endif @stop @section('content')
@if(!$edit_mode) New Customer @else Edit Customer: {{ $customer->phone }} - {{ $customer->first_name }} - {{ $customer->last_name }} @endif
{{ Form::open(array('name' => 'customer_form', 'url' => 'admin/customers/save','class'=>'form-horizontal')) }} {{ Form::hidden('edit_mode', (int)$edit_mode) }} @if($edit_mode) {{ Form::hidden('customer_id', $customer->id) }} @endif

General Information

{{ Form::text('phone', $edit_mode ? $customer->phone : Input::get('phone'), array('class' => 'form-control')) }} {{ Form::label('phone', 'Phone') }}
{{ Form::email('email', $edit_mode ? $customer->email : Input::get('email'), array('class' => 'form-control')) }} {{ Form::label('email', 'Email') }}
{{ Form::text('first_name', $edit_mode ? $customer->first_name : Input::get('first_name'), array('class' => 'form-control')) }} {{ Form::label('first_name', 'First Name') }}
{{ Form::text('last_name', $edit_mode ? $customer->last_name : Input::get('last_name'), array('class' => 'form-control')) }} {{ Form::label('last_name', 'Last Name') }}

Address

{{ Form::select('address_type', ['local_address' => "I'm local and live in the local area", 'not_local_address' => "I'm a visitor"], $edit_mode ? $customer->address_type : Input::get('address_type'), ['class' => 'form-control']) }}

Accommodation

{{ Form::select('accommodation_country_you_are_coming_from', [null => '--- Select ---'] + Customer::getCountries(), $edit_mode ? $customer_accommodation->country_you_are_coming_from : Input::get('accommodation_country_you_are_coming_from'), ['class' => 'form-control']) }} {{ Form::label('accommodation_country_you_are_coming_from', 'Country You Are Coming From') }}
{{ Form::text('accommodation_city', $edit_mode ? $customer_accommodation->city : Input::get('accommodation_city'), ['class' => 'form-control']) }} {{ Form::label('accommodation_city', 'City') }}
{{ Form::select('accommodation_type', [null => '-- Select --' , 'Hotel' => 'Hotel', 'Motel' => 'Motel', 'B & B' => 'B & B', 'Hostel' => 'Hostel', 'Friend\'s Place' => 'Friend\'s Place', 'Others' => 'Others'], $edit_mode ? $customer_accommodation->type : Input::get('accommodation_type'), ['class' => 'form-control']) }} {{ Form::label('accommodation_type') }}
{{ Form::text('accommodation_name', $edit_mode ? $customer_accommodation->name : Input::get('accommodation_name'), ['class' => 'form-control']) }} {{ Form::label('accommodation_name', 'Name') }}
{{ Form::text('accommodation_street', $edit_mode ? $customer_accommodation->street : Input::get('accommodation_street'), ['class' => 'form-control']) }} {{ Form::label('accommodation_street', 'Street') }}
{{ Form::text('accommodation_room', $edit_mode ? $customer_accommodation->room : Input::get('accommodation_room'), ['class' => 'form-control']) }} {{ Form::label('accommodation_room', 'Room') }}
{{ Form::text('accommodation_postal_code', $edit_mode ? $customer_accommodation->postal_code : Input::get('postal_code'), ['class' => 'form-control']) }} {{ Form::label('accommodation_postal_code', 'Postal Code') }}

Address

{{ Form::text('address_street', $edit_mode ? $customer_address->street_1 : Input::get('address_street'), ['class' => 'form-control']) }} {{ Form::label('address_street', 'Street') }}
{{ Form::text('address_city', $edit_mode ? $customer_address->city : Input::get('city'), ['class' => 'form-control']) }} {{ Form::label('address_city', 'City') }}
{{ Form::text('address_postal_code', $edit_mode ? $customer_address->postal_code : Input::get('postal_code'), ['class' => 'form-control']) }} {{ Form::label('address_postal_code', 'Postal Code') }}
Cancel {{ Form::button(' Save', array('type' => 'submit', 'class' => 'btn btn-lg green')) }}
{{ Form::close() }}
@stop @section('scripts') @parent @stop