From 992c5ccfbf593a9323549384c6231b1183552e35 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 22 Nov 2017 11:12:57 +0800 Subject: [PATCH] MDL-60526 forms: Button elements should have type The mform "buttons" should be of type "button", instead it's not specified so they get the default of "submit". This is causing behat fails. --- theme/boost/templates/core_form/element-button-inline.mustache | 1 + theme/boost/templates/core_form/element-button.mustache | 1 + 2 files changed, 2 insertions(+) diff --git a/theme/boost/templates/core_form/element-button-inline.mustache b/theme/boost/templates/core_form/element-button-inline.mustache index 6deac3a1395..fff81f93191 100644 --- a/theme/boost/templates/core_form/element-button-inline.mustache +++ b/theme/boost/templates/core_form/element-button-inline.mustache @@ -5,6 +5,7 @@ class="btn btn-secondary" name="{{element.name}}" id="{{element.id}}" + type="button" {{#error}} autofocus aria-describedby="id_error_{{element.name}}" {{/error}} diff --git a/theme/boost/templates/core_form/element-button.mustache b/theme/boost/templates/core_form/element-button.mustache index 76529cb0ccb..10d48514343 100644 --- a/theme/boost/templates/core_form/element-button.mustache +++ b/theme/boost/templates/core_form/element-button.mustache @@ -5,6 +5,7 @@ class="btn btn-secondary m-l-0" name="{{element.name}}" id="{{element.id}}" + type="button" {{#error}} autofocus aria-describedby="id_error_{{element.name}}" {{/error}}