/** The form constructor * @access public */ public function __construct() { $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element', 'element'); $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter'); $this->addElementPrefixPath('Pas_Validate', 'Pas/Validate/', 'validate'); $this->setAttrib('class', 'form-horizontal'); $this->setAttrib('accept-charset', 'UTF-8'); $this->clearDecorators(); $person = new Pas_User_Details(); $details = $person->getPerson(); if ($details) { $this->_role = $details->role; } else { $this->_role = 'public'; } parent::__construct(); }
/** Construct the form * @access public */ public function __construct() { $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element', 'element'); $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter'); $this->addElementPrefixPath('Pas_Validate', 'Pas/Validate/', 'validate'); $this->setAttrib('class', 'form-horizontal'); $this->setAttrib('accept-charset', 'UTF-8'); $this->clearDecorators(); $this->_view = Zend_Layout::getMvcInstance()->getView(); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/select2.min.js', $type = 'text/javascript'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/selectPrettify.js', $type = 'text/javascript'); $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/select2.css', $type = 'screen'); $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/bootstrap-multiselect.css', $type = 'screen'); $person = new Pas_User_Details(); $details = $person->getPerson(); if ($details) { $this->_role = $details->role; } else { $this->_role = 'public'; } parent::__construct(); }