'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", //'with_name_after' => ':', 'field_prefix' => 'Transaction', 'fields' => array ("stamp" => array('opts' => array('id' => 'charge_date', 'type' => 'text'), 'between' => 'Now', ), "through_date" => array('opts' => array('id' => 'through_date', 'type' => 'text'), 'between' => 'EOM', ), "comment" => array('opts' => array('size' => 50), ), ))); echo ('
' . "\n"); echo $this->element('form_table', array('class' => "item assess entry", //'with_name_after' => ':', 'field_prefix' => 'LedgerEntry.0', 'fields' => array ("charge_type" => array('opts' => array('options' => array('rent' => 'Rent', 'late' => 'Late Charge'), 'value' => (isset($charge['type']) ? $charge['type'] : null) ), ), "amount" => array('opts' => array('value' => (isset($charge['amount']) ? $charge['amount'] : null) ), ), "comment" => array('opts' => array('size' => 50)), ))); // Set up a redirect page. I use lower case 'redirect' here // to avoid the model convention, which starts with upper-case. foreach ($redirect AS $name => $value) { echo $form->input("redirect.$name", array('type' => 'hidden', 'value' => $value, )); } echo $form->end('Assess Charge'); ?>