Removed most of the validation on the job model

This commit is contained in:
Karl Cordes 2011-04-20 16:48:29 +10:00
parent 3877b7a933
commit 4b904673a2
3 changed files with 5 additions and 4 deletions

View file

@ -300,7 +300,6 @@ class JobsController extends AppController {
function ajax_edit() { function ajax_edit() {
if(!empty($this->data)) { if(!empty($this->data)) {
//print_r($this->data);
if ($this->Job->save($this->data)) { if ($this->Job->save($this->data)) {
echo "SUCCESS"; echo "SUCCESS";
} }

View file

@ -2,16 +2,18 @@
class Job extends AppModel { class Job extends AppModel {
var $name = 'Job'; var $name = 'Job';
var $validate = array( var $validate = array(
'title' => array('notempty'), 'title' => array('notempty'),
'enquiry_id' => array('numeric'), 'enquiry_id' => array('numeric'),
'date_order_received' => array('date'), /* 'date_order_received' => array('date'),
'domestic_freight_paid_by' => array('notempty'), 'domestic_freight_paid_by' => array('notempty'),
'sale_category' => array('notempty'), 'sale_category' => array('notempty'),
'shipment_category' => array('notempty') 'shipment_category' => array('notempty') */
); );

View file

@ -89,9 +89,9 @@
if(currencyID == 2) {//Export Sale. AUD if(currencyID == 2) {//Export Sale. AUD
$('.export_sale_aud').attr("readonly",false); $('.export_sale_aud').attr("readonly",false);
$(".export_sale_aud").addClass("highlighted"); $(".export_sale_aud").addClass("highlighted");
$(".aust_sale_aud").addClass("highlighted");
$(".aust_sale_fc").attr("readonly",true); $(".aust_sale_fc").attr("readonly",true);
$(".aust_sale_aud").attr("readonly",true);
$('.export_sale_fc').attr("readonly",true); $('.export_sale_fc').attr("readonly",true);
} }