00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00026
00027
00028
00029
00039
00040 class FF_Action_Confirm_Comment extends FF_Action_Display {
00041
00042
00050 function renderDisplay()
00051 {
00052 require_once FASTFRAME_ROOT . '/lib/FastFrame/Output/Table.php';
00053 $o_table =& new FF_Output_Table('oneColumn');
00054 $o_table->setTableHeaderText('Comment Confirmation');
00055 $o_table->setTableHeaders($this->getTableData());
00056 $o_table->setAlternateRowColors(false);
00057 $o_table->render();
00058 $o_tableWidget =& $o_table->getWidgetObject();
00059 $this->o_output->o_tpl->append('content_middle', $o_tableWidget->fetch());
00060 }
00061
00062
00063
00073 function getTableData()
00074 {
00075 $o_registry = FF_Registry::singleton();
00076 $this->o_output->setMessage($this->o_registry->getConfigParam('comment/confirm_text'), FASTFRAME_SUCCESS_MESSAGE);
00077 $a_headers = array();
00078 $a_headers[] = array(
00079 'title' => 'Your Name',
00080 'data' => FF_Request::getParam('name','s'),
00081 );
00082 if ($this->o_registry->getConfigParam('comment/show_phone')) {
00083 $a_headers[] = array(
00084 'title' => 'Phone Number',
00085 'data' => FF_Request::getParam('phone','s'),
00086 );
00087 }
00088
00089 if ($this->o_registry->getConfigParam('comment/show_email')) {
00090 $a_headers[] = array(
00091 'title' => 'Email Address',
00092 'data' => FF_Request::getParam('email','s'),
00093 );
00094 }
00095
00096 if ($this->o_registry->getConfigParam('comment/show_nominee_info')) {
00097 $a_headers[] = array(
00098 'title' => _('Nominee\'s Name'),
00099 'data' => FF_Request::getParam('nominee', 's'),
00100 );
00101 $a_headers[] = array(
00102 'title' => _('Nominee Type'),
00103 'data' => FF_Request::getParam('nominee_type', 's'),
00104 );
00105 }
00106
00107 $a_headers[] = array(
00108 'title' => 'Comment',
00109 'data' => nl2br(FF_Request::getParam('comment','s')),
00110 'dataIsSafe' => true,
00111 );
00112
00113 if ($this->o_registry->getConfigParam('comment/show_back_link')) {
00114 $a_headers[] = array(
00115 'title' => '',
00116 'data' => $this->o_output->link(
00117 FastFrame::selfURL(array('actionId' => ACTION_ADD)),
00118 sprintf(_('Click here to add another nomination for a Staff or Faculty member'))),
00119 'dataStyle' => 'style="font-weight: bold;"',
00120 'dataIsSafe' => true,
00121 );
00122 }
00123
00124 return $a_headers;
00125 }
00126
00127
00128 }
00129 ?>