<?php
// NewResponsibility.php
include_once('core/base/Action.php');

/**
 * Opens a new responsibility form.
 *
 * @author Matthew Lindberg
 */
class NewResponsibility extends Action
{
	
	/**
	 * 
	 *
	 * @access public
	 * @return boolean
	 */
	function execute(& $context)
	{
		global $__CS; 
		$__CS->EnterMethod("execute:NewResponsibility");
		
		$session	=& $context->getEntry(__SESSION);
		$request	=& $context->getEntry(__REQUEST);
		$timer		=& $context->getEntry(__TIMER);
		$model		=& $context->getEntry(__MODEL);
		
		include_once('core/responsibilities/forms/ResponsibilityForm.php');
		$respon_form =& new ResponsibilityForm(& $session, & $request);
		
		include_once('core/responsibilities/views/ResponsibilityEditView.php');
		$view =& new ResponsibilityEditView(& $timer, & $model, & $respon_form);
		$view->setPageFrom($request->get("pageback"));
		$view->init();
		
		$controller =& $context->getEntry(__CONTROLLER);
		$controller->setView(& $view);
		
		$__CS->ExitMethod("execute:NewResponsibility");
		return true;
	}
	
}
?>