<?php \Laravel\Section::start('content'); ?>
	<h1>Edit person data </h1>
	<?php echo  render('common.person_errors') ; ?>
	<?php echo  Form::open('person/update', 'PUT') ; ?>
	<div id="tabs">
		<ul>
			<li><a href="#tabs-1">Personal data</a></li>
			<li><a href="#tabs-2">Address</a></li>
			<li><a href="#tabs-3">Telephone</a></li>
		</ul>
		<div id="tabs-1">
			<p>
			   <?php echo  Form::label('name', 'Name:') ; ?> <br/>
			   <?php echo  Form::text('name', $person->person_name) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('surname', 'Surname:') ; ?> <br/>
			   <?php echo  Form::text('surname', $person->person_surname ) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('birthday', 'Date of birth:') ; ?> <br/>
			   <?php echo  Form::date('birthday', $person->person_birthday) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('language', 'Language:') ; ?> <br/>
			   <?php echo  Form::text('language', $person->person_language) ; ?>
			</p>
		</div>
		<div id="tabs-2">
			<p>
			   <?php echo  Form::label('email', 'e-mail:') ; ?> <br/>
			   <?php echo  Form::text('email', $person->person_email) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('address', 'Home address:') ; ?> <br/>
			   <?php echo  Form::text('address', $person->person_address) ; ?><br/>
			   <?php echo  Form::label('pcode', 'Postal code:') ; ?> <br/>
			   <?php echo  Form::text('pcode', $person->person_pcode) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('office', 'Office address:') ; ?> <br/>
			   <?php echo  Form::text('office', $person->person_office) ; ?>
			</p>
		</div>
		<div id="tabs-3">
			<p>
			   <?php echo  Form::label('off_phone', 'Office phone:') ; ?> <br/>
			   <?php echo  Form::text('off_phone', $person->person_off_phone) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('phone', 'Telephone:') ; ?> <br/>
			   <?php echo  Form::text('phone', $person->person_phone) ; ?>
			</p>
			<p>
			   <?php echo  Form::label('mobile', 'Mobile:') ; ?> <br/>
			   <?php echo  Form::text('mobile', $person->person_mobile) ; ?>
			</p>
		</div>
	</div>
	<?php echo  Form::hidden('id', $person->id) ; ?>
	<p>
		<?php echo  Form::submit('save' , array( 'class' => 'button')) ; ?>
		<?php echo  HTML::link_to_route('persons' , 'cancel', null, array( 'class'=>'button',)) ; ?>
	</p>
	<?php echo  Form::close() ; ?>
<?php \Laravel\Section::stop(); ?>


<?php echo view('layouts.default')->with(get_defined_vars())->render(); ?>