AppStateESS/homestead

View on GitHub
class/ShowHallNotificationSelectView.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Homestead;

/**
 * ShowHallNotificationSelectView
 *
 *  Creates the interface for showing hall selection for notification.
 *
 * @author Daniel West <lw77517 at appstate dot edu>
 * @package mod
 * @subpackage hms
 */

class ShowHallNotificationSelectView extends View{

    public function show(){
        /*
        if(!\Current_User::allow('hms', 'email_hall')){
            throw new PermissionException('You do not have permission to message halls.');
        }
        */

        $submitCmd = CommandFactory::getCommand('ShowHallNotificationEdit');
        $form = new \PHPWS_Form('select_halls_to_email');
        $submitCmd->initForm($form);

        javascript('jquery_ui');

        $cmd = CommandFactory::getCommand('ShowHallNotificationEdit');
        $form = new \PHPWS_Form("select_halls");
        $cmd->initForm($form);
        $form->addSubmit('submit', 'Submit');
        $form->setExtra('submit', 'onclick="submitHallList();"');
        $tpl = $form->getTemplate();

        \Layout::addPageTitle("Hall Notification Select");

        return \PHPWS_Template::process($tpl, 'hms', 'admin/messages.tpl').\Layout::getJavascript("modules/hms/hall_expander", array("DIV"=>"hall_list", "FORM"=>"select_halls"));
    }
}