diff --git a/lib/form/group.php b/lib/form/group.php index c6417b2d0d2..81094e9512b 100644 --- a/lib/form/group.php +++ b/lib/form/group.php @@ -46,6 +46,9 @@ class MoodleQuickForm_group extends HTML_QuickForm_group implements templatable /** @var string html for help button, if empty then no help */ var $_helpbutton=''; + /** @var bool if true label will be hidden. */ + protected $_hiddenLabel = false; + /** @var MoodleQuickForm */ protected $_mform = null; @@ -104,6 +107,15 @@ class MoodleQuickForm_group extends HTML_QuickForm_group implements templatable } } + /** + * Sets label to be hidden + * + * @param bool $hiddenLabel sets if label should be hidden + */ + public function setHiddenLabel($hiddenLabel) { + $this->_hiddenLabel = $hiddenLabel; + } + /** * Sets the grouped elements and hides label * diff --git a/lib/form/upgrade.txt b/lib/form/upgrade.txt index 923ccfbb328..271fa232aef 100644 --- a/lib/form/upgrade.txt +++ b/lib/form/upgrade.txt @@ -1,6 +1,10 @@ This files describes API changes in core_form libraries and APIs, information provided here is intended especially for developers. +=== 4.2.6 === + +* New method `setHiddenLabel` added to the group form element type + === 4.2.4 === * The group element has a new method `getAttributesForFormElement` which should be used in conjunction