diff --git a/views/leases/move_in.ctp b/views/leases/move_in.ctp index ff46bdf..8aa4f93 100644 --- a/views/leases/move_in.ctp +++ b/views/leases/move_in.ctp @@ -64,26 +64,26 @@ function onRowSelect(grid_id, item_type, item_id) { $("#movein-"+item_type).html($(grid_id).getCell(item_id, cell_name)); // Hide the "no customer" message and show the current customer - $("#no-"+item_type).hide(); - $("#current-"+item_type).show(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").show(); $("#"+item_type+"s-list .HeaderButton").click(); } function onGridState(grid_id, item_type, state) { if (state == 'visible') { - $("#no-"+item_type).hide(); - $("#current-"+item_type).hide(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").hide(); } else { //if ($(grid_id).getGridParam("selrow")) //alert("id:" + $("#"+item_type+"-id").val()); if ($("#"+item_type+"-id").val() > 0) { - $("#current-"+item_type).show(); - $("#no-"+item_type).hide(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").show(); } else { - $("#current-"+item_type).hide(); - $("#no-"+item_type).show(); + $("."+item_type+"-selection-invalid").show(); + $("."+item_type+"-selection-valid").hide(); } } } @@ -105,10 +105,17 @@ echo $this->element('customers', array 'limit' => 10, ))); -echo ('

' . - 'Customer: ' . - 'Please select customer' . - '

' . "\n"); +echo ('
' . + + '' . + + '' . + + '
' . "\n"); echo $this->element('units', array ('config' => array @@ -122,10 +129,17 @@ echo $this->element('units', array 'limit' => 10, ))); -echo ('

' . - 'Unit: ' . - 'Please select unit' . - '

' . "\n"); +echo ('
' . + + '' . + + '' . + + '
' . "\n"); echo $form->create(null, array('id' => 'move-in-form', 'url' => array('controller' => 'leases', @@ -167,21 +181,17 @@ echo $form->end('Move In Customer'); $("#customer-id").val(); $("#movein-customer").html(""); - $("#current-customer").show(); - $("#no-customer").hide(); + onGridState(null, 'customer', 'hidden'); - $("#current-customer").hide(); - $("#no-customer").hide(); + onGridState(null, 'customer', 'visible'); $("#unit-id").val(); $("#movein-unit").html(""); - $("#current-unit").show(); - $("#no-unit").hide(); + onGridState(null, 'unit', 'hidden'); - $("#current-unit").hide(); - $("#no-unit").hide(); + onGridState(null, 'unit', 'visible'); }); -->