Added a datepicker to the move-out view and put the input fields of both move-in and move-out into a table to tidy things up a bit.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@225 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -139,8 +139,15 @@ echo $form->input("Lease.unit_id",
|
||||
'type' => 'hidden',
|
||||
'value' => 0));
|
||||
|
||||
echo 'Date: <input id="datepicker" name="data[Lease][movein_date]" type="text" /><BR>' . "\n";
|
||||
echo 'Comment: <input id="comment" name="data[Lease][comment]" type="text" SIZE=80 /><BR>' . "\n";
|
||||
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');
|
||||
|
||||
?>
|
||||
|
||||
@@ -39,6 +39,17 @@ echo('<P>Be sure that you really want to move this customer out, ' .
|
||||
'and press the "Perform Move Out" button.' . "\n");
|
||||
echo '<P><BR>' . "\n";
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
|
||||
// Reset the form
|
||||
function resetForm() {
|
||||
}
|
||||
--></script>
|
||||
|
||||
<?php
|
||||
|
||||
echo $form->create(null, array('id' => 'move-out-form',
|
||||
'url' => array('controller' => 'leases',
|
||||
'action' => 'move_out')));
|
||||
@@ -46,7 +57,6 @@ echo $form->create(null, array('id' => 'move-out-form',
|
||||
// REVISIT <AP>: 20090702
|
||||
// Ask how to handle the security deposit
|
||||
// (apply to rent, damages, cleaning, etc).
|
||||
// Possibly provide a move-out date.
|
||||
// Let user select the next unit status
|
||||
// (DAMAGED, COMPANY, UNAVAILABLE, RESERVED, DIRTY, VACANT)
|
||||
|
||||
@@ -65,6 +75,14 @@ else {
|
||||
));
|
||||
}
|
||||
|
||||
echo $this->element('form_table',
|
||||
array('class' => "item move-out entry",
|
||||
'field_prefix' => 'Lease',
|
||||
'fields' => array
|
||||
("moveout_date" => array('opts' => array('type' => 'text',
|
||||
'id' => 'datepicker')),
|
||||
)));
|
||||
|
||||
// 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) {
|
||||
@@ -75,6 +93,18 @@ foreach ($redirect AS $name => $value) {
|
||||
}
|
||||
|
||||
echo $form->end('Perform Move Out');
|
||||
?>
|
||||
|
||||
// End page div
|
||||
echo '</div>' . "\n";
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function(){
|
||||
$("#datepicker").datepicker({ constrainInput: true,
|
||||
numberOfMonths: [1, 1],
|
||||
showCurrentAtPos: 0,
|
||||
dateFormat: 'mm/dd/yy' })
|
||||
.datepicker('setDate', '+0');
|
||||
|
||||
resetForm();
|
||||
});
|
||||
--></script>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user