diff --git a/lib/form/editor.php b/lib/form/editor.php index 1b6d895c377..6d7c700cb8f 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -64,6 +64,9 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab /** @var array values for editor */ protected $_values = array('text'=>null, 'format'=>null, 'itemid'=>null); + /** @var bool if true label will be hidden */ + protected $_hiddenLabel = false; + /** * Constructor * @@ -496,4 +499,14 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab return ''; } + + /** + * Sets label to be hidden. + * + * @param bool $hiddenLabel Whether the label should be hidden or not. + * @return void + */ + function setHiddenLabel($hiddenLabel) { + $this->_hiddenLabel = $hiddenLabel; + } } diff --git a/lib/form/templates/element-editor-inline.mustache b/lib/form/templates/element-editor-inline.mustache new file mode 100644 index 00000000000..05e460492ff --- /dev/null +++ b/lib/form/templates/element-editor-inline.mustache @@ -0,0 +1,5 @@ +{{< core_form/element-template-inline }} + {{$element}} + {{{element.html}}} + {{/element}} +{{/ core_form/element-template-inline }}