diff --git a/mod/data/amd/build/templateseditor.min.js b/mod/data/amd/build/templateseditor.min.js index d5be75a660c..c3fc575239e 100644 --- a/mod/data/amd/build/templateseditor.min.js +++ b/mod/data/amd/build/templateseditor.min.js @@ -5,6 +5,6 @@ define("mod_data/templateseditor",["exports","core/str","core/prefetch","core/ur * @module mod_data/templateseditor * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_templates=(obj=_templates)&&obj.__esModule?obj:{default:obj},(0,_prefetch.prefetchStrings)("admin",["confirmation"]),(0,_prefetch.prefetchStrings)("mod_data",["resettemplateconfirmtitle","resettemplateconfirm","enabletemplateeditorcheck","editorenable"]),(0,_prefetch.prefetchStrings)("core",["reset"]);const selectors_toggleTemplateEditor='input[name="useeditor"]',selectors_resetTemplate='input[name="defaultform"]',selectors_resetAllTemplates='input[name="resetall"]',selectors_resetButton='input[name="resetbutton"]',selectors_resetAllCheck='input[name="resetallcheck"]',selectors_editForm="#edittemplateform",registerResetButton=()=>{const editForm=document.querySelector(selectors_editForm),resetButton=document.querySelector(selectors_resetButton),resetTemplate=document.querySelector(selectors_resetTemplate),resetAllTemplates=document.querySelector(selectors_resetAllTemplates);resetButton&&resetTemplate&&editForm&&(resetButton.addEventListener("click",(async event=>{event.preventDefault(),(0,_notification.saveCancel)((0,_str.get_string)("resettemplateconfirmtitle","mod_data"),_templates.default.render("mod_data/template_editor_resetmodal",{resetallname:"resetallcheck"}),(0,_str.get_string)("reset","core"),(()=>{resetTemplate.value="true",editForm.submit()}),null,{triggerElement:event.target})})),resetAllTemplates&&document.addEventListener("change",(event=>{event.target.matches(selectors_resetAllCheck)&&(resetAllTemplates.value=event.target.checked?"true":"")})))},registerEditorToggler=(instanceId,mode)=>{const toggleTemplateEditor=document.querySelector(selectors_toggleTemplateEditor);toggleTemplateEditor&&toggleTemplateEditor.addEventListener("click",(async event=>{event.preventDefault();event.target.checked?(0,_notification.saveCancel)((0,_str.get_string)("confirmation","admin"),(0,_str.get_string)("enabletemplateeditorcheck","mod_data"),(0,_str.get_string)("editorenable","mod_data"),(()=>{window.location=(0,_url.relativeUrl)("/mod/data/templates.php",{d:instanceId,mode:mode,useeditor:!0})}),null,{triggerElement:event.target}):window.location=(0,_url.relativeUrl)("/mod/data/templates.php",{d:instanceId,mode:mode,useeditor:!1})}))};_exports.init=(instanceId,mode)=>{((instanceId,mode)=>{registerResetButton(),registerEditorToggler(instanceId,mode)})(instanceId,mode)}})); + */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_templates=(obj=_templates)&&obj.__esModule?obj:{default:obj},(0,_prefetch.prefetchStrings)("admin",["confirmation"]),(0,_prefetch.prefetchStrings)("mod_data",["resettemplateconfirmtitle","enabletemplateeditorcheck","editorenable"]),(0,_prefetch.prefetchStrings)("core",["reset"]);const selectors_toggleTemplateEditor='input[name="useeditor"]',selectors_resetTemplate='input[name="defaultform"]',selectors_resetAllTemplates='input[name="resetall"]',selectors_resetButton='input[name="resetbutton"]',selectors_resetAllCheck='input[name="resetallcheck"]',selectors_editForm="#edittemplateform",registerResetButton=mode=>{const editForm=document.querySelector(selectors_editForm),resetButton=document.querySelector(selectors_resetButton),resetTemplate=document.querySelector(selectors_resetTemplate),resetAllTemplates=document.querySelector(selectors_resetAllTemplates);resetButton&&resetTemplate&&editForm&&(resetButton.addEventListener("click",(async event=>{event.preventDefault();const params={resetallname:"resetallcheck",templatename:await(0,_str.get_string)(mode,"mod_data")};(0,_notification.saveCancel)((0,_str.get_string)("resettemplateconfirmtitle","mod_data"),_templates.default.render("mod_data/template_editor_resetmodal",params),(0,_str.get_string)("reset","core"),(()=>{resetTemplate.value="true",editForm.submit()}),null,{triggerElement:event.target})})),resetAllTemplates&&document.addEventListener("change",(event=>{event.target.matches(selectors_resetAllCheck)&&(resetAllTemplates.value=event.target.checked?"true":"")})))},registerEditorToggler=(instanceId,mode)=>{const toggleTemplateEditor=document.querySelector(selectors_toggleTemplateEditor);toggleTemplateEditor&&toggleTemplateEditor.addEventListener("click",(async event=>{event.preventDefault();event.target.checked?(0,_notification.saveCancel)((0,_str.get_string)("confirmation","admin"),(0,_str.get_string)("enabletemplateeditorcheck","mod_data"),(0,_str.get_string)("editorenable","mod_data"),(()=>{window.location=(0,_url.relativeUrl)("/mod/data/templates.php",{d:instanceId,mode:mode,useeditor:!0})}),null,{triggerElement:event.target}):window.location=(0,_url.relativeUrl)("/mod/data/templates.php",{d:instanceId,mode:mode,useeditor:!1})}))};_exports.init=(instanceId,mode)=>{((instanceId,mode)=>{registerResetButton(mode),registerEditorToggler(instanceId,mode)})(instanceId,mode)}})); //# sourceMappingURL=templateseditor.min.js.map \ No newline at end of file diff --git a/mod/data/amd/build/templateseditor.min.js.map b/mod/data/amd/build/templateseditor.min.js.map index df9f8ba54d1..13ca29c053a 100644 --- a/mod/data/amd/build/templateseditor.min.js.map +++ b/mod/data/amd/build/templateseditor.min.js.map @@ -1 +1 @@ -{"version":3,"file":"templateseditor.min.js","sources":["../src/templateseditor.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Javascript module to control the template editor.\n *\n * @module mod_data/templateseditor\n * @copyright 2021 Mihail Geshoski \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport {get_string as getString} from 'core/str';\nimport {prefetchStrings} from 'core/prefetch';\nimport {relativeUrl} from 'core/url';\nimport {saveCancel} from 'core/notification';\nimport Templates from 'core/templates';\n\nprefetchStrings('admin', ['confirmation']);\nprefetchStrings('mod_data', [\n 'resettemplateconfirmtitle',\n 'resettemplateconfirm',\n 'enabletemplateeditorcheck',\n 'editorenable'\n]);\nprefetchStrings('core', [\n 'reset',\n]);\n\n/**\n * Template editor constants.\n */\nconst selectors = {\n toggleTemplateEditor: 'input[name=\"useeditor\"]',\n resetTemplate: 'input[name=\"defaultform\"]',\n resetAllTemplates: 'input[name=\"resetall\"]',\n resetButton: 'input[name=\"resetbutton\"]',\n resetAllCheck: 'input[name=\"resetallcheck\"]',\n editForm: '#edittemplateform',\n};\n\n/**\n * Register event listeners for the module.\n *\n * @param {Number} instanceId The database ID\n * @param {string} mode The template mode\n */\nconst registerEventListeners = (instanceId, mode) => {\n registerResetButton();\n registerEditorToggler(instanceId, mode);\n};\n\nconst registerResetButton = () => {\n const editForm = document.querySelector(selectors.editForm);\n const resetButton = document.querySelector(selectors.resetButton);\n const resetTemplate = document.querySelector(selectors.resetTemplate);\n const resetAllTemplates = document.querySelector(selectors.resetAllTemplates);\n\n if (!resetButton || !resetTemplate || !editForm) {\n return;\n }\n\n resetButton.addEventListener('click', async(event) => {\n event.preventDefault();\n saveCancel(\n getString('resettemplateconfirmtitle', 'mod_data'),\n Templates.render('mod_data/template_editor_resetmodal', {resetallname: \"resetallcheck\"}),\n getString('reset', 'core'),\n () => {\n resetTemplate.value = \"true\";\n editForm.submit();\n },\n null,\n {triggerElement: event.target}\n );\n });\n\n // The reset all checkbox is inside a modal so we need to capture at document level.\n if (!resetAllTemplates) {\n return;\n }\n document.addEventListener('change', (event) => {\n if (event.target.matches(selectors.resetAllCheck)) {\n resetAllTemplates.value = (event.target.checked) ? \"true\" : \"\";\n }\n });\n};\n\nconst registerEditorToggler = (instanceId, mode) => {\n const toggleTemplateEditor = document.querySelector(selectors.toggleTemplateEditor);\n\n if (!toggleTemplateEditor) {\n return;\n }\n\n toggleTemplateEditor.addEventListener('click', async(event) => {\n event.preventDefault();\n // Whether the event action attempts to enable or disable the template editor.\n const enableTemplateEditor = event.target.checked;\n\n if (enableTemplateEditor) {\n // Display a confirmation dialog before enabling the template editor.\n saveCancel(\n getString('confirmation', 'admin'),\n getString('enabletemplateeditorcheck', 'mod_data'),\n getString('editorenable', 'mod_data'),\n () => {\n window.location = relativeUrl('/mod/data/templates.php', {d: instanceId, mode: mode, useeditor: true});\n },\n null,\n {triggerElement: event.target}\n );\n } else {\n window.location = relativeUrl('/mod/data/templates.php', {d: instanceId, mode: mode, useeditor: false});\n }\n });\n};\n\n/**\n * Initialize the module.\n *\n * @param {int} instanceId The database ID\n * @param {string} mode The template mode\n */\nexport const init = (instanceId, mode) => {\n registerEventListeners(instanceId, mode);\n};\n"],"names":["selectors","registerResetButton","editForm","document","querySelector","resetButton","resetTemplate","resetAllTemplates","addEventListener","async","event","preventDefault","Templates","render","resetallname","value","submit","triggerElement","target","matches","checked","registerEditorToggler","instanceId","mode","toggleTemplateEditor","window","location","d","useeditor","registerEventListeners"],"mappings":";;;;;;;8KA6BgB,QAAS,CAAC,+CACV,WAAY,CACxB,4BACA,uBACA,4BACA,+CAEY,OAAQ,CACpB,gBAMEA,+BACoB,0BADpBA,wBAEa,4BAFbA,4BAGiB,yBAHjBA,sBAIW,4BAJXA,wBAKa,8BALbA,mBAMQ,oBAcRC,oBAAsB,WAClBC,SAAWC,SAASC,cAAcJ,oBAClCK,YAAcF,SAASC,cAAcJ,uBACrCM,cAAgBH,SAASC,cAAcJ,yBACvCO,kBAAoBJ,SAASC,cAAcJ,6BAE5CK,aAAgBC,eAAkBJ,WAIvCG,YAAYG,iBAAiB,SAASC,MAAAA,QAClCC,MAAMC,+CAEF,mBAAU,4BAA6B,YACvCC,mBAAUC,OAAO,sCAAuC,CAACC,aAAc,mBACvE,mBAAU,QAAS,SACnB,KACIR,cAAcS,MAAQ,OACtBb,SAASc,WAEb,KACA,CAACC,eAAgBP,MAAMQ,YAK1BX,mBAGLJ,SAASK,iBAAiB,UAAWE,QAC7BA,MAAMQ,OAAOC,QAAQnB,2BACrBO,kBAAkBQ,MAASL,MAAMQ,OAAOE,QAAW,OAAS,SAKlEC,sBAAwB,CAACC,WAAYC,cACjCC,qBAAuBrB,SAASC,cAAcJ,gCAE/CwB,sBAILA,qBAAqBhB,iBAAiB,SAASC,MAAAA,QAC3CC,MAAMC,iBAEuBD,MAAMQ,OAAOE,sCAKlC,mBAAU,eAAgB,UAC1B,mBAAU,4BAA6B,aACvC,mBAAU,eAAgB,aAC1B,KACIK,OAAOC,UAAW,oBAAY,0BAA2B,CAACC,EAAGL,WAAYC,KAAMA,KAAMK,WAAW,MAEpG,KACA,CAACX,eAAgBP,MAAMQ,SAG3BO,OAAOC,UAAW,oBAAY,0BAA2B,CAACC,EAAGL,WAAYC,KAAMA,KAAMK,WAAW,sBAWxF,CAACN,WAAYC,QA7EF,EAACD,WAAYC,QACxCtB,sBACAoB,sBAAsBC,WAAYC,OA4ElCM,CAAuBP,WAAYC"} \ No newline at end of file +{"version":3,"file":"templateseditor.min.js","sources":["../src/templateseditor.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Javascript module to control the template editor.\n *\n * @module mod_data/templateseditor\n * @copyright 2021 Mihail Geshoski \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport {get_string as getString} from 'core/str';\nimport {prefetchStrings} from 'core/prefetch';\nimport {relativeUrl} from 'core/url';\nimport {saveCancel} from 'core/notification';\nimport Templates from 'core/templates';\n\nprefetchStrings('admin', ['confirmation']);\nprefetchStrings('mod_data', [\n 'resettemplateconfirmtitle',\n 'enabletemplateeditorcheck',\n 'editorenable'\n]);\nprefetchStrings('core', [\n 'reset',\n]);\n\n/**\n * Template editor constants.\n */\nconst selectors = {\n toggleTemplateEditor: 'input[name=\"useeditor\"]',\n resetTemplate: 'input[name=\"defaultform\"]',\n resetAllTemplates: 'input[name=\"resetall\"]',\n resetButton: 'input[name=\"resetbutton\"]',\n resetAllCheck: 'input[name=\"resetallcheck\"]',\n editForm: '#edittemplateform',\n};\n\n/**\n * Register event listeners for the module.\n *\n * @param {Number} instanceId The database ID\n * @param {string} mode The template mode\n */\nconst registerEventListeners = (instanceId, mode) => {\n registerResetButton(mode);\n registerEditorToggler(instanceId, mode);\n};\n\nconst registerResetButton = (mode) => {\n const editForm = document.querySelector(selectors.editForm);\n const resetButton = document.querySelector(selectors.resetButton);\n const resetTemplate = document.querySelector(selectors.resetTemplate);\n const resetAllTemplates = document.querySelector(selectors.resetAllTemplates);\n\n if (!resetButton || !resetTemplate || !editForm) {\n return;\n }\n\n resetButton.addEventListener('click', async(event) => {\n event.preventDefault();\n const params = {\n resetallname: \"resetallcheck\",\n templatename: await getString(mode, 'mod_data'),\n };\n saveCancel(\n getString('resettemplateconfirmtitle', 'mod_data'),\n Templates.render('mod_data/template_editor_resetmodal', params),\n getString('reset', 'core'),\n () => {\n resetTemplate.value = \"true\";\n editForm.submit();\n },\n null,\n {triggerElement: event.target}\n );\n });\n\n // The reset all checkbox is inside a modal so we need to capture at document level.\n if (!resetAllTemplates) {\n return;\n }\n document.addEventListener('change', (event) => {\n if (event.target.matches(selectors.resetAllCheck)) {\n resetAllTemplates.value = (event.target.checked) ? \"true\" : \"\";\n }\n });\n};\n\nconst registerEditorToggler = (instanceId, mode) => {\n const toggleTemplateEditor = document.querySelector(selectors.toggleTemplateEditor);\n\n if (!toggleTemplateEditor) {\n return;\n }\n\n toggleTemplateEditor.addEventListener('click', async(event) => {\n event.preventDefault();\n // Whether the event action attempts to enable or disable the template editor.\n const enableTemplateEditor = event.target.checked;\n\n if (enableTemplateEditor) {\n // Display a confirmation dialog before enabling the template editor.\n saveCancel(\n getString('confirmation', 'admin'),\n getString('enabletemplateeditorcheck', 'mod_data'),\n getString('editorenable', 'mod_data'),\n () => {\n window.location = relativeUrl('/mod/data/templates.php', {d: instanceId, mode: mode, useeditor: true});\n },\n null,\n {triggerElement: event.target}\n );\n } else {\n window.location = relativeUrl('/mod/data/templates.php', {d: instanceId, mode: mode, useeditor: false});\n }\n });\n};\n\n/**\n * Initialize the module.\n *\n * @param {int} instanceId The database ID\n * @param {string} mode The template mode\n */\nexport const init = (instanceId, mode) => {\n registerEventListeners(instanceId, mode);\n};\n"],"names":["selectors","registerResetButton","mode","editForm","document","querySelector","resetButton","resetTemplate","resetAllTemplates","addEventListener","async","event","preventDefault","params","resetallname","templatename","Templates","render","value","submit","triggerElement","target","matches","checked","registerEditorToggler","instanceId","toggleTemplateEditor","window","location","d","useeditor","registerEventListeners"],"mappings":";;;;;;;8KA6BgB,QAAS,CAAC,+CACV,WAAY,CACxB,4BACA,4BACA,+CAEY,OAAQ,CACpB,gBAMEA,+BACoB,0BADpBA,wBAEa,4BAFbA,4BAGiB,yBAHjBA,sBAIW,4BAJXA,wBAKa,8BALbA,mBAMQ,oBAcRC,oBAAuBC,aACnBC,SAAWC,SAASC,cAAcL,oBAClCM,YAAcF,SAASC,cAAcL,uBACrCO,cAAgBH,SAASC,cAAcL,yBACvCQ,kBAAoBJ,SAASC,cAAcL,6BAE5CM,aAAgBC,eAAkBJ,WAIvCG,YAAYG,iBAAiB,SAASC,MAAAA,QAClCC,MAAMC,uBACAC,OAAS,CACXC,aAAc,gBACdC,mBAAoB,mBAAUb,KAAM,2CAGpC,mBAAU,4BAA6B,YACvCc,mBAAUC,OAAO,sCAAuCJ,SACxD,mBAAU,QAAS,SACnB,KACIN,cAAcW,MAAQ,OACtBf,SAASgB,WAEb,KACA,CAACC,eAAgBT,MAAMU,YAK1Bb,mBAGLJ,SAASK,iBAAiB,UAAWE,QAC7BA,MAAMU,OAAOC,QAAQtB,2BACrBQ,kBAAkBU,MAASP,MAAMU,OAAOE,QAAW,OAAS,SAKlEC,sBAAwB,CAACC,WAAYvB,cACjCwB,qBAAuBtB,SAASC,cAAcL,gCAE/C0B,sBAILA,qBAAqBjB,iBAAiB,SAASC,MAAAA,QAC3CC,MAAMC,iBAEuBD,MAAMU,OAAOE,sCAKlC,mBAAU,eAAgB,UAC1B,mBAAU,4BAA6B,aACvC,mBAAU,eAAgB,aAC1B,KACII,OAAOC,UAAW,oBAAY,0BAA2B,CAACC,EAAGJ,WAAYvB,KAAMA,KAAM4B,WAAW,MAEpG,KACA,CAACV,eAAgBT,MAAMU,SAG3BM,OAAOC,UAAW,oBAAY,0BAA2B,CAACC,EAAGJ,WAAYvB,KAAMA,KAAM4B,WAAW,sBAWxF,CAACL,WAAYvB,QAjFF,EAACuB,WAAYvB,QACxCD,oBAAoBC,MACpBsB,sBAAsBC,WAAYvB,OAgFlC6B,CAAuBN,WAAYvB"} \ No newline at end of file diff --git a/mod/data/amd/src/templateseditor.js b/mod/data/amd/src/templateseditor.js index 69bfd4aaec7..604af7768cf 100644 --- a/mod/data/amd/src/templateseditor.js +++ b/mod/data/amd/src/templateseditor.js @@ -30,7 +30,6 @@ import Templates from 'core/templates'; prefetchStrings('admin', ['confirmation']); prefetchStrings('mod_data', [ 'resettemplateconfirmtitle', - 'resettemplateconfirm', 'enabletemplateeditorcheck', 'editorenable' ]); @@ -57,11 +56,11 @@ const selectors = { * @param {string} mode The template mode */ const registerEventListeners = (instanceId, mode) => { - registerResetButton(); + registerResetButton(mode); registerEditorToggler(instanceId, mode); }; -const registerResetButton = () => { +const registerResetButton = (mode) => { const editForm = document.querySelector(selectors.editForm); const resetButton = document.querySelector(selectors.resetButton); const resetTemplate = document.querySelector(selectors.resetTemplate); @@ -73,9 +72,13 @@ const registerResetButton = () => { resetButton.addEventListener('click', async(event) => { event.preventDefault(); + const params = { + resetallname: "resetallcheck", + templatename: await getString(mode, 'mod_data'), + }; saveCancel( getString('resettemplateconfirmtitle', 'mod_data'), - Templates.render('mod_data/template_editor_resetmodal', {resetallname: "resetallcheck"}), + Templates.render('mod_data/template_editor_resetmodal', params), getString('reset', 'core'), () => { resetTemplate.value = "true"; diff --git a/mod/data/lang/en/data.php b/mod/data/lang/en/data.php index bf3e829fb72..7b1bd24968c 100644 --- a/mod/data/lang/en/data.php +++ b/mod/data/lang/en/data.php @@ -397,7 +397,7 @@ $string['resetalltemplatesconfirm'] = 'You\'re about to remove all templates for $string['resetsettings'] = 'Reset filters'; $string['resettemplate'] = 'Reset template'; $string['resettemplateconfirmtitle'] = 'Reset template?'; -$string['resettemplateconfirm'] = 'Resetting a template removes the existing preset and any customisations you have done to the template. You can\'t undo this action.'; +$string['resettemplateconfirm'] = 'This will permanently remove the {$a} for your current preset.'; $string['resizingimages'] = 'Resizing image thumbnails...'; $string['rows'] = 'rows'; $string['rssglobaldisabled'] = 'Disabled. See site configuration variables.'; diff --git a/mod/data/templates/template_editor_resetmodal.mustache b/mod/data/templates/template_editor_resetmodal.mustache index 495d64a34f4..9b00cc85626 100644 --- a/mod/data/templates/template_editor_resetmodal.mustache +++ b/mod/data/templates/template_editor_resetmodal.mustache @@ -21,7 +21,7 @@ "resetallname": "resetallcheck" } }} -

{{#str}} resetalltemplatesconfirm, mod_data {{/str}}

+

{{#str}} resettemplateconfirm, mod_data, {{templatename}} {{/str}}

diff --git a/mod/data/tests/behat/edit_templates.feature b/mod/data/tests/behat/edit_templates.feature index e33f26cacbb..59ec29f1acc 100644 --- a/mod/data/tests/behat/edit_templates.feature +++ b/mod/data/tests/behat/edit_templates.feature @@ -124,6 +124,7 @@ Feature: Users can edit the database templates When I navigate to "Templates" in current page administration And I set the field "Templates tertiary navigation" to "List view template" And I click on "Reset" "button" in the "sticky-footer" "region" + And I should see "This will permanently remove the List view template for your current preset." And I click on "Reset" "button" in the "Reset template?" "dialogue" Then I should see "Template reset" And I navigate to "Database" in current page administration @@ -156,6 +157,7 @@ Feature: Users can edit the database templates When I navigate to "Templates" in current page administration And I click on "Actions" "button" And I choose "Reset all templates" in the open action menu + And I should see "You're about to remove all templates for your current preset." And I click on "Reset" "button" in the "Reset all templates?" "dialogue" Then I should see "All templates reset" And I navigate to "Database" in current page administration @@ -193,6 +195,7 @@ Feature: Users can edit the database templates And I should see "Initial add" When I navigate to "Templates" in current page administration And I click on "Reset" "button" in the "sticky-footer" "region" + And I should see "This will permanently remove the Add entry template for your current preset." And I click on "Reset all templates" "checkbox" And I click on "Reset" "button" in the "Reset template?" "dialogue" Then I should see "All templates reset"