CommentConfirm.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // +----------------------------------------------------------------------+
00021 
00022 // }}}
00023 // {{{ requires
00024 
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00026 
00027 // }}}
00028 // {{{ class FF_Action_Display_Ticket 
00029 
00039 // }}}
00040 class FF_Action_Confirm_Comment extends FF_Action_Display {
00041     // {{{ renderDisplay()
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     // {{{ getTableData()
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 ?>

Generated on Fri Jun 23 11:38:15 2006 for FastFrame by  doxygen 1.4.4