<div class="purchaseOrders form">
    <?php echo $javascript->link('addpurchaseorder'); ?>
    <?php echo $form->create('PurchaseOrder');?>
    <fieldset>
	<legend><?php __('New PurchaseOrder');?></legend>



	<div class="input text">
	    <label for="PurchaseOrderIssueDateDisplay">Issue Date</label>
	    <input id="PurchaseOrderIssueDateDisplay" type="text" value="" class="datePicker">
	</div>

        <div class="input text">
	    <label for="PurchaseOrderDispatchDateDisplay">Dispatch Date</label>
	    <input id="PurchaseOrderDispatchDateDisplay" type="text" value="" class="datePicker">
        </div>

	<div class="input text">
	    <label for="PurchaseOrderDateArrivedDisplay">Arrived Date</label>
	    <input id="PurchaseOrderDateArrivedDisplay" type="text" value="" class="datePicker">
        </div>

	<?php
	echo $form->input('issue_date', array('type'=>'hidden'));
	echo $form->input('dispatch_date', array('type'=>'hidden'));
	echo $form->input('date_arrived', array('type'=>'hidden'));
	echo $form->input('title', array('type'=>'hidden'));
	echo $form->input('principle_id');
	echo $form->input('principle_reference');
	echo $form->input('document_id', array('type'=>'hidden', 'value'=>0));
	echo $form->input('Job', array('label'=>'Jobs in this PO',
	'type'=>'select',
	'multiple'=>'checkbox',
	'options'=>$jobs,
	'selected'=>$html->value('Job.Job')));
	?>
    </fieldset>
    <?php echo $form->end('Submit');?>
</div>
<div class="actions">
    <ul>
	<li><?php echo $html->link(__('List PurchaseOrders', true), array('action' => 'index'));?></li>
	<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
	<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
	<li><?php echo $html->link(__('List Documents', true), array('controller' => 'documents', 'action' => 'index')); ?> </li>
	<li><?php echo $html->link(__('New Document', true), array('controller' => 'documents', 'action' => 'add')); ?> </li>
	<li><?php echo $html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
	<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
    </ul>
</div>
