/** * Class constructor * * @param string $elementLabel (optional)Link label * @param string $href (optional)Link href * @param string $text (optional)Link display text * @param mixed $attributes (optional)Either a typical HTML attribute string * or an associative array * @since 1.0 * @access public * @return void * @throws */ public function __construct($elementName = null, $elementLabel = null, $href = null, $text = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = false; $this->_type = 'link'; $this->setHref($href); $this->_text = $text; }
/** * Class constructor * * @param string $elementName Header name * @param string $text Header text * @access public * @return void */ function HTML_QuickForm_header($elementName = null, $text = null) { if (!empty($elementName)) { $text = $elementName; } parent::__construct($elementName, null, $text); $this->_type = 'header'; }
/** * Class constructor * * @param string $elementName Header name * @param string $text Header text * @access public * @return void */ public function __construct($elementName = null, $text = null) { if (!empty($elementName)) { $text = $elementName; } parent::__construct($elementName, null, $text); $this->_type = 'header'; }
/** * constructor * * @param string $elementName (optional) name of the field * @param string $elementClass (optional) show as warning or notification => 'notifyproblem' * @param string $text (optional) Text to put in warning field */ public function __construct($elementName = null, $elementClass = 'notifyproblem', $text = null) { parent::__construct($elementName, null, $text); $this->_type = 'warning'; if (is_null($elementClass)) { $elementClass = 'notifyproblem'; } $this->_class = $elementClass; }
/** * constructor * * @param string $elementName (optional) name of the field * @param string $elementClass (optional) show as warning or notification => 'notifyproblem' * @param string $text (optional) Text to put in warning field */ function MoodleQuickForm_warning($elementName = null, $elementClass = 'notifyproblem', $text = null) { parent::HTML_QuickForm_static($elementName, null, $text); $this->_type = 'warning'; if (is_null($elementClass)) { $elementClass = 'notifyproblem'; } $this->_class = $elementClass; }
function toHtml() { return '<div class="form-group"> <label class="col-sm-2 control-label"></label> <div class="col-sm-10"> ' . HTML_QuickForm_static::toHtml() . ' </div> </div>'; }
function toHtml() { return '<div class="control-group "> <label class="control-label"></label> <div class="controls"> '.HTML_QuickForm_static::toHtml().' </div> </div> '; } //end func toHtml
function toHtml() { $for = $this->getLabelFor(); return '<div class="control-group "> <label class="control-label"'.(empty($for)?'':' for="'.$for.'"').'>'.$this->getLabel().'</label> <div class="controls"> '.HTML_QuickForm_static::toHtml().' </div> </div> '; } //end func toHtml
function toHtml() { $id = $this->getAttribute('id'); $idCondition = null; if (!empty($id)) { $idCondition = 'id="' . $id . '"'; } return '<div class="form-group" ' . $idCondition . ' > <label class="col-sm-2 control-label">' . $this->getLabel() . '</label> <div class="col-sm-10"> ' . HTML_QuickForm_static::toHtml() . ' </div> </div>'; }
/** * Class constructor * * @param mixed $elementName custom element name or if its array then first element * is element name and the second one is template name */ function __construct($elementName = null, $elementLabel = null, $vars = null, $visible = true) { if (is_array($elementName)) { $name = $elementName[0]; $templateId = $elementName[1]; } else { $name = $elementName; $templateId = $elementName; } parent::__construct($name, $elementLabel); $this->_type = 'custom'; $this->templateId = $templateId; $this->vars = $vars; $this->visible = $visible; }
/** * constructor * * @param string $elementName (optional) name of the text field * @param string $elementLabel (optional) text field label * @param string $text (optional) Text to put in text field */ public function __construct($elementName = null, $elementLabel = null, $text = null) { parent::__construct($elementName, $elementLabel, $text); }
function MoodleQuickForm_static($elementName = null, $elementLabel = null, $text = null) { parent::HTML_QuickForm_static($elementName, $elementLabel, $text); }
function toHtml() { return HTML_QuickForm_static::toHtml(); }
/** * Class constructor * * @param string $elementName Header name * @param string $text Header text * @access public * @return void */ public function __construct($elementName = null, $text = null) { parent::__construct($elementName, null, $text); $this->_type = 'header'; }
/** * @return string */ public function toHtml() { return parent::toHtml(); }
/** * Class constructor * * @param string $name element name * @param string $text raw HTML to add * @access public * @return void */ function __construct($name = null, $text = null) { parent::__construct($name, null, $text); $this->_type = 'html'; }
/** * Sets the text * * @param string $text * @access public * @return void */ static function setText($text) { self::$_text = $text; }
/** * Class constructor * * @param string $text raw HTML to add * @access public * @return void */ public function __construct($text = null) { parent::__construct(null, null, $text); $this->_type = 'html'; }
/** * Called by HTML_QuickForm whenever form event is made on this element * * @param string Name of event * @param mixed event arguments * @param object calling object * @access public * @return bool true */ function onQuickFormEvent($event, $arg, &$caller) { if (is_a($caller, 'html_quickform')) { $this->setParentForm($caller); } switch ($event) { case 'updateValue': $this->_subForm->_submitValues = $caller->_submitValues; $this->_subForm->setDefaults($caller->_defaultValues); $this->_subForm->setConstants($caller->_constantValues); break; default: parent::onQuickFormEvent($event, $arg, $caller); break; } return true; }
/** * Class constructor * * @param string $elementName Header name */ function __construct($elementName = null, $text = null) { parent::__construct($elementName, null, $text); $this->_type = 'break'; }