diff --git a/lang/en/editor.php b/lang/en/editor.php index 013b923b0aa29..54f94d75b8ce1 100644 --- a/lang/en/editor.php +++ b/lang/en/editor.php @@ -53,6 +53,7 @@ $string['delete'] = 'Delete'; $string['editors'] = 'Text editors'; $string['editorsettings'] = 'Manage editors'; +$string['editorxformat'] = '{$a} format'; $string['enterurlfirst'] = 'You have to enter an URL first'; $string['filebrowser'] = 'File Browser'; $string['findwhat'] = 'Find'; diff --git a/lib/editor/atto/tests/behat/autosave.feature b/lib/editor/atto/tests/behat/autosave.feature index d66cb2fb5e23d..dbea83c4a986f 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -21,7 +21,7 @@ Feature: Atto Autosave And I click on "Save changes" "button" And I am on "Course 1" course homepage And I navigate to "Edit settings" in current page administration - And I set the field with xpath "//select[@name='summary_editor[format]']" to "1" + And I set the field "Course summary format" to "1" And I click on "Save and display" "button" And I log out diff --git a/lib/form/editor.php b/lib/form/editor.php index 6d7c700cb8f90..c28f73bbd9e8d 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -444,6 +444,7 @@ function toHtml() { $context['id'] = $id; $context['value'] = $text; $context['format'] = $format; + $context['formatlabel'] = get_string('editorxformat', 'editor', $this->_label); if (!is_null($this->getAttribute('onblur')) && !is_null($this->getAttribute('onchange'))) { $context['changelistener'] = true; diff --git a/lib/form/templates/editor_textarea.mustache b/lib/form/templates/editor_textarea.mustache index 22ed026dce9ba..9102dab19827a 100644 --- a/lib/form/templates/editor_textarea.mustache +++ b/lib/form/templates/editor_textarea.mustache @@ -35,6 +35,7 @@
{{#hasformats}} +