From 07148ecf6bdd957652085605d11793fb24c2af8d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 5 Feb 2020 08:08:32 +0000 Subject: [PATCH 1/2] Acessibility: A checkbox is a checkbox --- doc/smarty3-templates.md | 11 ---------- mod/settings.php | 2 +- view/templates/admin/features.tpl | 4 ++-- view/templates/dfrn_request.tpl | 2 +- view/templates/field_yesno.tpl | 16 -------------- view/templates/settings/features.tpl | 2 +- .../settings/profile/hide-friends.tpl | 2 +- view/templates/settings/settings.tpl | 10 ++++----- view/theme/frio/templates/dfrn_request.tpl | 2 +- view/theme/frio/templates/field_yesno.tpl | 21 ------------------- .../frio/templates/settings/features.tpl | 2 +- .../frio/templates/settings/settings.tpl | 10 ++++----- 12 files changed, 18 insertions(+), 66 deletions(-) delete mode 100644 view/templates/field_yesno.tpl delete mode 100644 view/theme/frio/templates/field_yesno.tpl diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index 27e2a0230..b39fa117e 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -178,14 +178,3 @@ Field parameter: 2. Current text for the box, 3. Help text for the input box. 4. if set to "required" modern browser will check that this input box is filled when submitting the form, - -### field_yesno.tpl - -A button that has two states *yes* or *no*. -Field parameter: - -0. Name of the input field, -1. Label for the button, -2. Current value, -3. Help text for the button -4. if set to an array of two values, these two will be used, otherwise "off" and "on". diff --git a/mod/settings.php b/mod/settings.php index 3ba5dc2b3..277470ad5 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1075,7 +1075,7 @@ function settings_content(App $a) $openid_field = ['openid_url', DI::l10n()->t('OpenID:'), $openid, DI::l10n()->t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "readonly", "url"]; } - $opt_tpl = Renderer::getMarkupTemplate("field_yesno.tpl"); + $opt_tpl = Renderer::getMarkupTemplate("field_checkbox.tpl"); if (DI::config()->get('system', 'publish_all')) { $profile_in_dir = ''; } else { diff --git a/view/templates/admin/features.tpl b/view/templates/admin/features.tpl index f0b696fae..b1c8bad8f 100644 --- a/view/templates/admin/features.tpl +++ b/view/templates/admin/features.tpl @@ -11,8 +11,8 @@
{{foreach $f.1 as $fcat}}
- {{include file="field_yesno.tpl" field=$fcat.0}} - {{include file="field_yesno.tpl" field=$fcat.1}} + {{include file="field_checkbox.tpl" field=$fcat.0}} + {{include file="field_checkbox.tpl" field=$fcat.1}}
{{/foreach}} diff --git a/view/templates/dfrn_request.tpl b/view/templates/dfrn_request.tpl index 27cc72347..2f6aec62e 100644 --- a/view/templates/dfrn_request.tpl +++ b/view/templates/dfrn_request.tpl @@ -51,7 +51,7 @@
-{{include file="field_yesno.tpl" field=$does_know_you}} +{{include file="field_checkbox.tpl" field=$does_know_you}}