'function(ids) { if (ids != null) { onRowSelect("#"+$(this).attr("id"), "customer", ids); } }' ); $customer_grid_setup['onHeaderClick'] = array ('--special' => 'function(gridstate) { onGridState("#"+$(this).attr("id"), "customer", gridstate); }' ); $unit_grid_setup = array(); if (isset($unit['id'])) $unit_grid_setup['hiddengrid'] = true; $unit_grid_setup['onSelectRow'] = array ('--special' => 'function(ids) { if (ids != null) { onRowSelect("#"+$(this).attr("id"), "unit", ids); } }' ); $unit_grid_setup['onHeaderClick'] = array ('--special' => 'function(gridstate) { onGridState("#"+$(this).attr("id"), "unit", gridstate); }' ); ?> element('customers', array('grid_div_id' => 'customers-list', 'grid_div_class' => 'text-below', 'caption' => ('Select Customer'), 'grid_setup' => $customer_grid_setup, 'nolinks' => true, 'limit' => 10, )); echo ('

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

' . "\n"); echo $this->element('units', array('grid_div_id' => 'units-list', 'grid_div_class' => 'text-below', 'caption' => ('Select Unit'), 'grid_setup' => $unit_grid_setup, 'action' => 'unoccupied', 'nolinks' => true, 'limit' => 10, )); echo ('

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

' . "\n"); echo $form->create(null, array('id' => 'move-in-form', 'url' => array('controller' => 'leases', 'action' => 'move_in'))); echo $form->input("Lease.customer_id", array('id' => 'customer-id', 'type' => 'hidden', 'value' => 0)); echo $form->input("Lease.unit_id", array('id' => 'unit-id', 'type' => 'hidden', 'value' => 0)); echo $this->element('form_table', array('class' => "item move-in entry", 'field_prefix' => 'Lease', 'fields' => array ("movein_date" => array('opts' => array('type' => 'text', 'id' => 'datepicker')), "comment" => array('opts' => array('size' => 50)), ))); echo $form->end('Move In Customer'); ?>