From 7d2860f97ce513010591d43eade5f1c1ed97a33a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 21 Jul 2025 12:17:20 +0200 Subject: [PATCH] Replace toggle buttons with normal check boxes Normal check boxes have clearer semantics, and play nicer with the usability provided by default by the web browser. --- volse/tpl/field_checkbox.tpl | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 volse/tpl/field_checkbox.tpl diff --git a/volse/tpl/field_checkbox.tpl b/volse/tpl/field_checkbox.tpl new file mode 100644 index 0000000..534a405 --- /dev/null +++ b/volse/tpl/field_checkbox.tpl @@ -0,0 +1,37 @@ +{{* Override the toggle-buttons to turn them back into regilar check boxes. + * + * SPDX-FileCopyrightText: 2025 Eilertsens Kodeknekkeri + * SPDX-FileContributor: Harald Eilertsen + * + * SPDX-License-Identifier: AGPL-3.0-or-later + * + * $field array index: + * .0 field name: name=... for input, id=id_... for input, id=label_... for label, id=help_... for small text + * .1 label text + * .2 checked + * .3 help/info text + * .4 on/off value: (unused in this template) + * .4.0 off + * .4.1 on + * .5 additional operands for html input statement + * .6 label text addition, used for qmc + * css classes used: + * .clearfix, .form_group, .checkbox + * .floatright + * .switchlabel, .onoffswitch-switch + * .required, .code + * .form-control, .form-text, .text-muted + * + *}} +
+ + +
{{$field.3}}
+