Added ability to edit a unit, except for sort/walk order. To handle those things we'll need to: save unit's old sort/walk position; adjust down (by one) all unit positions greater than the old position; adjust up (by one) all unit positions greater than or equal to the new unit position; update the unit's position. I'm not going to worry about it right now.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@494 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
27
views/units/edit.ctp
Normal file
27
views/units/edit.ctp
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php /* -*- mode:PHP -*- */
|
||||
|
||||
echo '<div class="unit edit">' . "\n";
|
||||
|
||||
echo $form->create('Unit', array('action' => 'edit')) . "\n";
|
||||
echo $form->input('id') . "\n";
|
||||
|
||||
echo($this->element
|
||||
('form_table',
|
||||
array('class' => 'item unit detail',
|
||||
'caption' => isset($this->data['Unit']) ? 'Edit Unit' : 'New Unit',
|
||||
'fields' => array
|
||||
('name' => true,
|
||||
'unit_size_id' => true,
|
||||
'status' => array('opts' =>
|
||||
array('options' => $statusEnums,
|
||||
),
|
||||
),
|
||||
'deposit' => true,
|
||||
'rent' => true,
|
||||
'comment' => true,
|
||||
))) . "\n");
|
||||
|
||||
echo $form->submit('Update') . "\n";
|
||||
echo $form->submit('Cancel', array('name' => 'cancel')) . "\n";
|
||||
echo $form->end() . "\n";
|
||||
echo '</div>' . "\n";
|
||||
Reference in New Issue
Block a user