'function(ids) { if (ids != null) { onCustomerRowSelect("#"+$(this).attr("id"), ids); } }' ); $unit_grid_setup = array(); if (isset($unit['id'])) $unit_grid_setup['hiddengrid'] = true; $unit_grid_setup['onSelectRow'] = array ('--special' => 'function(ids) { if (ids != null) { onUnitRowSelect("#"+$(this).attr("id"), ids); } }' ); ?> element('customers', array('grid_div_id' => 'customers-list', 'caption' => ('Select Customer'), 'grid_setup' => $customer_grid_setup, 'nolinks' => true, 'limit' => 10, )); echo $this->element('units', array('grid_div_id' => 'units-list', 'caption' => ('Select Unit'), 'grid_setup' => $unit_grid_setup, 'action' => 'unoccupied', 'nolinks' => true, 'limit' => 10, )); echo ('

' . '' . 'Customer: ' . '' . (isset($customer['name']) ? $customer['name'] : "") . '' . '' . '' . 'Please select customer' . '' . '

' . "\n"); echo ('

' . '' . 'Unit: ' . '' . (isset($unit['name']) ? $unit['name'] : "") . '' . '' . '' . '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' => isset($customer['id']) ? $customer['id'] : 0)); echo $form->input("Lease.unit_id", array('id' => 'unit-id', 'type' => 'hidden', 'value' => isset($unit['id']) ? $unit['id'] : 0)); echo 'Date:
' . "\n"; echo 'Comment:
' . "\n"; echo $form->end('Move In Customer'); ?>