cmc-sales/views/enquiries/add.ctp
2009-01-27 12:46:00 +11:00

50 lines
2.3 KiB
PHP
Executable file

<div class="enquiries form">
<?php echo $form->create('Enquiry');?>
<fieldset>
<legend><?php __("New Enquiry: Step $step");?></legend>
<?php
if($step == 1) {
echo '<div class="input text">';
echo '<span>Start typing the Company name and it should appear in a list below. It must already exist in the database</span>';
echo $form->label('Customer.name', 'Company Name');
echo $ajax->autoComplete('Customer.name', '/enquiries/completeCustomer');
echo '</div>';
echo $form->input('step', array('type'=>'hidden', 'value' => $step));
echo $form->input('finished', array('type' => 'hidden', 'value' => 'false'));
echo $form->end('Proceed to Step 2');
}
else {
//echo $form->select('Contact.id', array(), null, array('id'=>'contacts'));
echo $form->input('Customer.name', array('readonly'=>'readonly', 'value'=>$customer['Customer']['name']));
echo $form->input('user_id', array('label' =>'Assigned to User'), $users);
echo $form->input('contact_id');
echo '<span>The Contact will be emailed informing them of the new Enquiry</span>';
echo $form->input('state_id');
echo $form->input('country_id');
echo $form->input('gst', array('label' => 'Is GST Applicable', 'options' => array('1' => 'Yes', '0' => 'No')));
echo $form->input('principle_id');
echo $form->input('status_id');
echo $form->input('comments', array('maxlength' => '250000'));
echo $form->input('customer_id', array('type'=>'hidden', 'value' => $customer['Customer']['id']));
echo $form->input('finished', array('type' => 'hidden', 'value' => 'true'));
echo $form->input('step', array('type'=>'hidden', 'value' => $step));
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->end('Add Enquiry and Email Customer');
echo '<span>After submitting it will take a moment to email the customer before you are redirected to the new Enquiry.</span>';
}
?>
</fieldset>
</div>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Customer', true), array('controller'=> 'customers', 'action'=>'add')); ?> </li>
</ul>
</div>