<div class="enquiries form">

<?php echo $form->create('Enquiry');?>
	<fieldset>
 		<legend><?php __("Edit Enquiry: ".$enquiry['Enquiry']['title']);?></legend>
	<?php
	
		$initials = $currentuser['User']['first_name'][0].$currentuser['User']['last_name'][0]; //Used for adding initials to Comments.
		echo $form->input('id');
		echo $form->input('user_id', array('label'=>'Assigned to User'));
		echo $form->input('principle_id');
		echo $form->input('Customer.name', array('label'=>'Customer','readonly'=>'readonly', 'value'=>$enquiry['Customer']['name']));
		echo $form->input('customer_id', array('type'=>'hidden'));
		echo $form->input('state_id', array('type'=>'hidden'));
		echo $form->input('country_id', array('type'=>'hidden'));
                echo $form->input('contact_id');
//echo $form->input('contact_id', array('type'=>'hidden'));
		echo $form->input('State.name', array('label'=>'State','readonly'=>'readonly', 'value'=>$enquiry['State']['name']));
		echo $form->input('Country.name', array('label'=>'Country','readonly'=>'readonly', 'value'=>$enquiry['Country']['name']));
		echo $form->input('gst', array('label' => 'Is GST Applicable', 'options' => array('1' => 'Yes', '0' => 'No')));
		echo $form->input('billing_address_id', array('div' => 'addressradio', 'legend' => 'Billing Address', 'options' => $billing_addresses_list, 'type' => 'radio'));
		echo $form->input('shipping_address_id', array('div' => 'addressradio','legend' => 'Shipping Address', 'options' => $shipping_addresses_list, 'type' => 'radio'));
		echo $form->input('status_id');


		/* Need to fix this up Once Quotes are working
		if($enquiry['Enquiry']['submitted']) {
			echo $form->input('status_id');
		}
		else {
			echo "Quote has not been submitted yet";
		}
		*/
		
		//echo $form->input('submitted');
		echo $form->input('comments', array('id'=>'comments', 'wrap'=>'hard'));
		?> 
		<input type="BUTTON" onClick="datetime('<?php echo "$initials"; ?>');" value="Edit Comments" class="dateButton" id="datebutton"/>
		<?
		echo $javascript->link('quotenik/add_datetime.js', true); 
		echo $form->input('posted', array('label' => 'This quote been sent hard copy via Post'));
	
	
	?>
	</fieldset>
<?php echo $form->end('Submit');?>

</div>

