From cfb9f9ec2a8cb4baf8190cac148b8a0fd7678fd2 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 25 Jan 2008 21:48:38 +0000 Subject: [PATCH] Add hour and minute selection fields to queue advancement selections. --- application/models/rows/ApprovalActionVote.php | 7 ------- .../views/approval_actions/ApprovalActionQueue.xhtml | 7 +++++++ .../views/approval_actions/ApprovalActionVote.xhtml | 7 +++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/application/models/rows/ApprovalActionVote.php b/application/models/rows/ApprovalActionVote.php index 7e5f6cc8..16c5d45f 100644 --- a/application/models/rows/ApprovalActionVote.php +++ b/application/models/rows/ApprovalActionVote.php @@ -81,13 +81,6 @@ class ApprovalActionVote extends ApprovalActionQueue $this->votingRole = ApprovalBodyRoles::getInstance()->findOne($votingRoleId); $this->quorum = Zend_Filter_Int::filter($formData['quorum']); - if (is_array($formData['schedule'])) { - foreach ($formData['schedule'] as $scheduleId => $scheduleData) { - $formData['schedule'][$scheduleId]['hour'] = 0; - $formData['schedule'][$scheduleId]['minute'] = 5; - } - } - parent::updateFromForm($formData); } diff --git a/application/views/approval_actions/ApprovalActionQueue.xhtml b/application/views/approval_actions/ApprovalActionQueue.xhtml index cf4f8b00..448650ab 100644 --- a/application/views/approval_actions/ApprovalActionQueue.xhtml +++ b/application/views/approval_actions/ApprovalActionQueue.xhtml @@ -25,6 +25,7 @@ if ($approvalAction) { <th>Year</th> <th>Month</th> <th>Day</th> + <th colspan="2">Time</th> </tr> <?php foreach ($current['dates'] as $scheduledAdvance) { ?> <tr> @@ -34,6 +35,10 @@ if ($approvalAction) { $scheduledAdvance->date->get(Zend_Date::MONTH)); ?></td> <td><?php echo $this->formSelectDay($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][day]', $scheduledAdvance->date->get(Zend_Date::DAY)); ?></td> + <td><?php echo $this->formSelectHour($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][hour]', + $scheduledAdvance->date->get(Zend_Date::HOUR)); ?></td> + <td><?php echo $this->formSelectMinute($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][minute]', + $scheduledAdvance->date->get(Zend_Date::MINUTE)); ?></td> <td><?php echo $this->formCheckbox($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][delete]'); ?></td> </tr> <?php } ?> @@ -41,6 +46,8 @@ if ($approvalAction) { <td> <?php echo $this->formSelectYear($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][year]', null, array('disabled' => 'disabled')); ?> </td> <td> <?php echo $this->formSelectMonth($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][month]', null, array('disabled' => 'disabled')); ?> </td> <td> <?php echo $this->formSelectDay($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][day]', null, array('disabled' => 'disabled')); ?> </td> + <td> <?php echo $this->formSelectHour($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][hour]', null, array('disabled' => 'disabled')); ?> </td> + <td> <?php echo $this->formSelectMinute($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][minute]', null, array('disabled' => 'disabled')); ?> </td> <td> <a href="#" class="remove_record_button">-</a> </td> </tr> <tr> diff --git a/application/views/approval_actions/ApprovalActionVote.xhtml b/application/views/approval_actions/ApprovalActionVote.xhtml index 225c22a8..a831d3f5 100644 --- a/application/views/approval_actions/ApprovalActionVote.xhtml +++ b/application/views/approval_actions/ApprovalActionVote.xhtml @@ -33,6 +33,7 @@ if ($approvalAction) { <th>Year</th> <th>Month</th> <th>Day</th> + <th colspan="2">Time</th> </tr> <?php foreach ($current['dates'] as $scheduledAdvance) { ?> <tr> @@ -42,6 +43,10 @@ if ($approvalAction) { $scheduledAdvance->date->get(Zend_Date::MONTH)); ?></td> <td><?php echo $this->formSelectDay($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][day]', $scheduledAdvance->date->get(Zend_Date::DAY)); ?></td> + <td><?php echo $this->formSelectHour($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][hour]', + $scheduledAdvance->date->get(Zend_Date::HOUR)); ?></td> + <td><?php echo $this->formSelectMinute($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][minute]', + $scheduledAdvance->date->get(Zend_Date::MINUTE)); ?></td> <td><?php echo $this->formCheckbox($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[' . $scheduledAdvance->getPrimaryKey() . '][delete]'); ?></td> </tr> <?php } ?> @@ -49,6 +54,8 @@ if ($approvalAction) { <td> <?php echo $this->formSelectYear($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][year]', null, array('disabled' => 'disabled')); ?> </td> <td> <?php echo $this->formSelectMonth($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][month]', null, array('disabled' => 'disabled')); ?> </td> <td> <?php echo $this->formSelectDay($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][day]', null, array('disabled' => 'disabled')); ?> </td> + <td> <?php echo $this->formSelectHour($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][hour]', null, array('disabled' => 'disabled')); ?> </td> + <td> <?php echo $this->formSelectMinute($current['keyPrefix'] . 'schedule' . $current['keySuffix'] . '[__key__][minute]', null, array('disabled' => 'disabled')); ?> </td> <td> <a href="#" class="remove_record_button">-</a> </td> </tr> <tr> -- GitLab