diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-07-15 14:22:51 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-08-16 12:04:28 +0100 |
commit | 48156c475483e6e603bef436abf19f79a2bc277c (patch) | |
tree | d78076d23e073d9586719ce2fdb1d4a282703f61 | |
parent | c0c59b1304c8d6dcd8057d8314092f98d20cde59 (diff) |
Add type=button to non-submit buttons.
11 files changed, 20 insertions, 20 deletions
diff --git a/templates/web/base/admin/bodies/contact-form.html b/templates/web/base/admin/bodies/contact-form.html index efc576b24..312b6ab96 100644 --- a/templates/web/base/admin/bodies/contact-form.html +++ b/templates/web/base/admin/bodies/contact-form.html @@ -142,7 +142,7 @@ as well.") %] [% END %] <input class="hidden-js js-group-item-template form-control" type="text" name="group" value="" size="30"> <p class="hidden-nojs"> - <button class="btn btn--small js-group-item-add">[% loc('Add group') %]</button> + <button type="button" class="btn btn--small js-group-item-add">[% loc('Add group') %]</button> </p> [% ELSE %] <input class="form-control" type="text" name="group" value="[% contact.extra.group | html %]" size="30"> diff --git a/templates/web/base/admin/extra-metadata-form.html b/templates/web/base/admin/extra-metadata-form.html index 59d07ddf9..aad14ea37 100644 --- a/templates/web/base/admin/extra-metadata-form.html +++ b/templates/web/base/admin/extra-metadata-form.html @@ -1,7 +1,7 @@ <ul class="js-metadata-items"> [% FOR meta IN metas.merge([{}]) %] <li class="js-metadata-item [% IF loop.last %]hidden-js js-metadata-item-template[% END %]" data-index="[% loop.index %]"> - <button class="btn btn--small js-metadata-item-remove hidden-nojs">[% loc('Remove field') %]</button> + <button type="button" class="btn btn--small js-metadata-item-remove hidden-nojs">[% loc('Remove field') %]</button> <div class="admin-hint"><p>[% loc('The ordering of this field on the report page. Fields are shown in ascending order according to this value.') %]</p></div> <label> @@ -75,17 +75,17 @@ [% loc('Name') %] <input class="js-metadata-option-name" name="metadata[[% outer_loop.index %]].values[[% loop.index %]].name" type="text" value="[% option.name | html %]"> </label> - <button class="btn btn--small js-metadata-option-remove hidden-nojs">[% loc('Remove') %]</button> + <button type="button" class="btn btn--small js-metadata-option-remove hidden-nojs">[% loc('Remove') %]</button> </li> [% END %] <li class="hidden-nojs"> - <button class="btn btn--small js-metadata-option-add">[% loc('Add option') %]</button> + <button type="button" class="btn btn--small js-metadata-option-add">[% loc('Add option') %]</button> </li> </ul> </div> </li> [%- END %] <li class="hidden-nojs"> - <button class="btn btn--small js-metadata-item-add">[% loc('Add field') %]</button> + <button type="button" class="btn btn--small js-metadata-item-add">[% loc('Add field') %]</button> </li> </ul> diff --git a/templates/web/base/report/_item_expandable.html b/templates/web/base/report/_item_expandable.html index 7723ed54a..ed3ce751c 100644 --- a/templates/web/base/report/_item_expandable.html +++ b/templates/web/base/report/_item_expandable.html @@ -47,7 +47,7 @@ </div> <div class="item-list__item--expandable__actions"> - <button class="btn btn--small js-toggle-expansion" data-more="[% loc('Read more') %]" data-less="[% loc('Read less') %]">[% loc('Read more') %]</button> + <button type="button" class="btn btn--small js-toggle-expansion" data-more="[% loc('Read more') %]" data-less="[% loc('Read less') %]">[% loc('Read more') %]</button> </div> </li> diff --git a/templates/web/base/report/form/user.html b/templates/web/base/report/form/user.html index 5f14d9adc..ca78d93bc 100644 --- a/templates/web/base/report/form/user.html +++ b/templates/web/base/report/form/user.html @@ -5,7 +5,7 @@ [% loc('Next:') %] [% loc('Tell us about you') %] </h2> [% IF c.user_exists OR NOT c.cobrand.social_auth_enabled %] - <button class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Continue') %]</button> + <button type="button" class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Continue') %]</button> [% ELSE %] [% IF c.config.FACEBOOK_APP_ID %] <button name="social_sign_in" id="facebook_sign_in" value="facebook" class="btn btn--block btn--social btn--facebook"> @@ -24,7 +24,7 @@ [% loc('Log in with Twitter') %] </button> [% END %] - <button class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Log in with email') %]</button> + <button type="button" class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Log in with email') %]</button> [% END %] </div> <!-- /report/form/user.html --> diff --git a/templates/web/base/report/new/duplicate_suggestions.html b/templates/web/base/report/new/duplicate_suggestions.html index dd05dc9a4..991c8d5e8 100644 --- a/templates/web/base/report/new/duplicate_suggestions.html +++ b/templates/web/base/report/new/duplicate_suggestions.html @@ -3,7 +3,7 @@ version('/js/duplicates.js'), ) -%] <div id="js-duplicate-reports" class="duplicate-report-suggestions hidden"> - <button class="duplicate-report-suggestions__close js-hide-duplicate-suggestions">[% loc('Close') %]</button> + <button type="button" class="duplicate-report-suggestions__close js-hide-duplicate-suggestions">[% loc('Close') %]</button> <h2 class="form-section-heading">[% loc('Already been reported?') %]</h2> <div class="form-section-description"> [% IF c.cobrand.is_council %] @@ -14,7 +14,7 @@ </div> <ul class="item-list"></ul> - <button class="btn btn--block js-hide-duplicate-suggestions">[% loc('Continue – report a new problem') %]</button> + <button type="button" class="btn btn--block js-hide-duplicate-suggestions">[% loc('Continue – report a new problem') %]</button> </div> <div class="js-template-get-updates hidden"> <div id="alerts" class="get-updates js-alert-list"> diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html index 2292ed78b..ca4e2e58b 100644 --- a/templates/web/base/report/new/form_user.html +++ b/templates/web/base/report/new/form_user.html @@ -10,7 +10,7 @@ <strong class="js-form-section-preview" data-source="#form_title"></strong> <span class="js-form-section-preview" data-source="#form_detail"></span> </p> - <button class="btn btn--block js-new-report-user-hide">[% loc('Edit report details') %]</button> + <button type="button" class="btn btn--block js-new-report-user-hide">[% loc('Edit report details') %]</button> </div> [% IF c.user_exists %] diff --git a/templates/web/base/report/update-form-wrapper.html b/templates/web/base/report/update-form-wrapper.html index 3a75036cc..5347df3c3 100644 --- a/templates/web/base/report/update-form-wrapper.html +++ b/templates/web/base/report/update-form-wrapper.html @@ -1,6 +1,6 @@ [% UNLESS c.cobrand.updates_disallowed(problem) %] [% IF two_column_sidebar %] - <button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> + <button type="button" class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> <div class="hidden-js"> [% END %] [% INCLUDE 'report/update-form.html' %] diff --git a/templates/web/base/report/update/form_user.html b/templates/web/base/report/update/form_user.html index d9a181e26..bfa227293 100644 --- a/templates/web/base/report/update/form_user.html +++ b/templates/web/base/report/update/form_user.html @@ -5,7 +5,7 @@ <div class="hidden-nojs form-section-preview"> <h2 class="form-section-heading">[% loc('Your update') %]</h2> <p class="js-form-section-preview" data-source="#form_update"></p> - <button class="btn btn--block js-new-report-user-hide">[% loc('Edit your update') %]</button> + <button type="button" class="btn btn--block js-new-report-user-hide">[% loc('Edit your update') %]</button> </div> [% IF c.user_exists %] diff --git a/templates/web/borsetshire/auth/_general_top.html b/templates/web/borsetshire/auth/_general_top.html index 0af3737e8..3ab3c39bc 100644 --- a/templates/web/borsetshire/auth/_general_top.html +++ b/templates/web/borsetshire/auth/_general_top.html @@ -5,16 +5,16 @@ different types of user we’ve set up on this demo site: <ul id='demo-user-list' class="clearfix"> <li> -<button class="btn" data-email="user@example.org">Normal user</button> +<button type="button" class="btn" data-email="user@example.org">Normal user</button> <span>A local resident who has created reports and updates on the site.</span> <li> -<button class="btn" data-email="cs@example.org">Customer service</button> +<button type="button" class="btn" data-email="cs@example.org">Customer service</button> <span>A customer service staff member, who can create and moderate existing reports.</span> <li> -<button class="btn" data-email="inspector@example.org">Inspector</button> +<button type="button" class="btn" data-email="inspector@example.org">Inspector</button> <span>An inspector staff member, who can inspect reports and create shortlists.</span> <li> -<button class="btn" data-email="super@example.org">Super user</button> +<button type="button" class="btn" data-email="super@example.org">Super user</button> <span>A superuser staff member, who can do all the above, plus also edit users, templates, and priorities in the Admin screen.</span> </ul> diff --git a/templates/web/bromley/report/update/form_user.html b/templates/web/bromley/report/update/form_user.html index c8df54c46..e003298c5 100644 --- a/templates/web/bromley/report/update/form_user.html +++ b/templates/web/bromley/report/update/form_user.html @@ -5,7 +5,7 @@ <div class="hidden-nojs form-section-preview"> <h2 class="form-section-heading">[% loc('Your update') %]</h2> <p class="js-form-section-preview" data-source="#form_update"></p> - <button class="btn btn--block js-new-report-user-hide">[% loc('Edit your update') %]</button> + <button type="button" class="btn btn--block js-new-report-user-hide">[% loc('Edit your update') %]</button> </div> [% IF c.user_exists %] diff --git a/templates/web/westminster/report/form/user.html b/templates/web/westminster/report/form/user.html index dd4770430..c2fec9082 100644 --- a/templates/web/westminster/report/form/user.html +++ b/templates/web/westminster/report/form/user.html @@ -5,7 +5,7 @@ [% loc('Next:') %] [% loc('Tell us about you') %] </h2> [% IF c.user_exists OR NOT c.cobrand.social_auth_enabled %] - <button class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Continue') %]</button> + <button type="button" class="btn btn--block hidden-nojs js-new-report-user-show">[% loc('Continue') %]</button> [% ELSE %] [% IF c.config.FACEBOOK_APP_ID %] <button name="social_sign_in" id="facebook_sign_in" value="facebook" class="btn btn--block btn--social btn--facebook"> @@ -24,7 +24,7 @@ [% loc('Log in with Twitter') %] </button> [% END %] - <button class="btn btn--block hidden-nojs js-new-report-user-show">Confirm by email</button> + <button type="button" class="btn btn--block hidden-nojs js-new-report-user-show">Confirm by email</button> [% END %] </div> <!-- /report/form/user.html --> |