예제 #1
0
 function run_policy_reviewed_date_form($policy)
 {
     $prettyDate = $this->prettifyEvenEmptyMysqlDatetime($policy->get_value("last_reviewed_date"));
     echo "<div class=\"reviewInfo\">\n";
     echo "<a name=\"" . self::ANCHOR_LAST_REVIEWED . "\"></a>\n";
     echo $this->createLastReviewedDateHeader($policy);
     /*
     			echo "<p>" . (($prettyDate == self::UNSET_DATE)
     				? "This item does not have a last reviewed date."
     				: "This item was last reviewed on $prettyDate") . ".</p>\n";
     */
     echo "<p>By clicking \"I Agree\", you affirm that you have reviewed this policy and that it is up-to-date. Clicking \"I Agree\" will set the policy's last reviewed date to " . date("M jS, Y") . ".</p>\n";
     $this->edit_policy = $policy;
     $form = new Disco();
     $form->set_box_class("StackedBox");
     $form->actions = array(self::ACTION_CANCEL => 'Cancel', self::ACTION_MARK_POLICY_REVIEWED => 'I Agree');
     if (THIS_IS_A_DEVELOPMENT_REASON_INSTANCE) {
         $form->actions[self::ACTION_DEBUG] = 'Set back to 0000-00-00 for testing purposes.';
     }
     $form->add_callback(array(&$this, '_process_policy_reviewed_date'), 'process');
     $form->add_callback(array(&$this, '_where_to_policy_reviewed_date'), 'where_to');
     $form->run();
     echo "</div>\n";
 }