'function(ids) { if (ids != null) { onRowSelect("#"+$(this).attr("id"), ids); } }' ); $lease_grid_setup['onHeaderClick'] = array ('--special' => 'function(gridstate) { onGridState("#"+$(this).attr("id"), gridstate); }' ); ?> element('leases', array('grid_div_id' => 'leases-list', 'grid_div_class' => 'text-below', 'caption' => ('Select Lease'), 'grid_setup' => $lease_grid_setup, 'nolinks' => true, 'limit' => 10, )); echo ('

' . 'Lease: ' . 'Please select lease' . '

' . "\n"); echo $form->create(null, array('id' => 'assess-form', 'url' => array('controller' => 'transactions', 'action' => 'postInvoice'))); echo $form->input("Lease.id", array('id' => 'lease-id', 'type' => 'hidden', 'value' => 0)); echo $this->element('form_table', array('class' => "item assess entry", 'field_prefix' => 'Transaction', 'fields' => array ("stamp" => array('opts' => array('id' => 'charge_date', 'type' => 'text')), "through_date" => array('opts' => array('id' => 'through_date', 'type' => 'text')), "charge_type" => array('prefix' => 'LedgerEntry.0', 'opts' => array('options' => array('rent' => 'Rent', 'late' => 'Late Charge'), 'value' => $charge['type'])), "amount" => array('prefix' => 'LedgerEntry.0', 'opts' => array('value' => $charge['amount'])), "comment" => array('opts' => array('size' => 50)), ))); echo $form->end('Assess Charge'); ?>