[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX][UX] Fix disconnected labels on radio inputs in poll, backup, and share templates

"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a1979213bfe_38193bc4498b7@gitlab-sidekiq-low-urgency-cpu-bound-v2-6b99557b78-vsht6.mail>

Bruno Kambere pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
7b15e5f9 by Sacha Pignot at 2026-05-29T14:13:54+03:00
[FIX][UX] Fix disconnected labels on radio inputs in poll, backup, and share templates
---
* [FIX] Drop redundant |escape from ID/for pair in backup.tpl foreach loop

* [FIX][UX] Disambiguate which_date_all IDs across Smarty branches in poll_results.tpl

* [FIX][UX] Fix disconnected labels on radio inputs in poll, backup, and share templates

See merge request tikiwiki/tiki!10084

- - - - -


4 changed files:

- templates/manager/backup.tpl
- templates/tiki-poll.tpl
- templates/tiki-poll_results.tpl
- templates/tiki-share.tpl


Changes:

=====================================
templates/manager/backup.tpl
=====================================
@@ -25,8 +25,8 @@
                     <div class="row">
                     {foreach item=type from=$inputValues['backup_process']}
                         <div class="col-sm-3">
-                            <input type="radio" class="form-check-input" id="backup_process" name="backup_process" value="{$type|escape}" {if  $type eq 'full backup'}checked{/if}>
-                            <label class="form-check-label" for="backup_process">{$type|upper}</label>
+                            <input type="radio" class="form-check-input" id="backup_process_{$type|lower|replace:' ':'_'}" name="backup_process" value="{$type|escape}" {if $type eq 'full backup'}checked{/if}>
+                            <label class="form-check-label" for="backup_process_{$type|lower|replace:' ':'_'}">{$type|upper}</label>
                         </div>
                     {/foreach}
                     </div>


=====================================
templates/tiki-poll.tpl
=====================================
@@ -6,8 +6,8 @@
     {if $tiki_p_vote_poll ne 'n' && ($user || $prefs.feature_poll_anonymous == 'y' || $prefs.feature_antibot eq 'y')}
         {section name=ix loop=$channels}
             <div class="form-check">
-                <input class="form-check-input" type="radio" name="polls_optionId" value="{$channels[ix].optionId|escape}"{if $polls_optionId == $channels[ix].optionId} checked="checked"{/if}>
-                <label class="form-check-label" for="polls_optionId">{tr}{$channels[ix].title|escape}{/tr}</label>
+                <input class="form-check-input" type="radio" name="polls_optionId" id="polls_option_{$channels[ix].optionId|escape}" value="{$channels[ix].optionId|escape}"{if $polls_optionId == $channels[ix].optionId} checked="checked"{/if}>
+                <label class="form-check-label" for="polls_option_{$channels[ix].optionId|escape}">{tr}{$channels[ix].title|escape}{/tr}</label>
             </div>
         {/section}
     {else}


=====================================
templates/tiki-poll_results.tpl
=====================================
@@ -35,7 +35,10 @@
     <div class="mb-3 row">
         <label class="col-sm-3 col-form-label">{tr}Votes to show{/tr}</label>
         <div class="col-sm-9">
-            <input type="radio" name="which_date" value="between"{if $which_date eq 'between'} checked="checked"{/if} class="form-check-input me-2"><label class="col-form-label-sm">{tr}Within a date range{/tr}</label>
+            <div class="form-check">
+                <input type="radio" name="which_date" id="which_date_between" value="between"{if $which_date eq 'between'} checked="checked"{/if} class="form-check-input">
+                <label class="form-check-label" for="which_date_between">{tr}Within a date range{/tr}</label>
+            </div>
             <div class="mb-3 row mt-2">
                 <label class="col-sm-2 col-form-label-sm">{tr}Start{/tr}</label>
                 <div class="col-sm-7">
@@ -49,17 +52,19 @@
                 </div>
             </div>
             {if empty($pollId) or $poll_info.voteConsiderationSpan > 0}
-                <label>
-                    <input type="radio" class="form-check-input" name="which_date" value="all"{if $which_date eq 'all'} checked="checked"{/if}>
-                    {tr}All votes with no time span consideration{/tr}
-                </label>
-                <br>
-                <label>
-                    <input type="radio" class="form-check-input" name="which_date" value="consideration"{if $which_date eq 'consideration' or $which_date eq ''} checked="checked"{/if}>
-                    {tr}All votes with time span consideration{/tr}
-                </label>
+                <div class="form-check">
+                    <input type="radio" class="form-check-input" name="which_date" id="which_date_all_no_span" value="all"{if $which_date eq 'all'} checked="checked"{/if}>
+                    <label class="form-check-label" for="which_date_all_no_span">{tr}All votes with no time span consideration{/tr}</label>
+                </div>
+                <div class="form-check">
+                    <input type="radio" class="form-check-input" name="which_date" id="which_date_consideration" value="consideration"{if $which_date eq 'consideration' or $which_date eq ''} checked="checked"{/if}>
+                    <label class="form-check-label" for="which_date_consideration">{tr}All votes with time span consideration{/tr}</label>
+                </div>
             {else}
-                <input type="radio" name="which_date" value="all"{if $which_date eq 'all' or $which_date eq ''} checked="checked"{/if} class="me-2 form-check-input"><label class="col-form-label-sm">{tr}All votes{/tr}</label>
+                <div class="form-check">
+                    <input type="radio" name="which_date" id="which_date_all_simple" value="all"{if $which_date eq 'all' or $which_date eq ''} checked="checked"{/if} class="form-check-input">
+                    <label class="form-check-label" for="which_date_all_simple">{tr}All votes{/tr}</label>
+                </div>
             {/if}
             <input type="submit" class="btn btn-primary btn-sm" name="search" value="{tr}Find{/tr}">
         </div>


=====================================
templates/tiki-share.tpl
=====================================
@@ -217,10 +217,14 @@
                     </td>
                     <td>
                         {if $twitter}
-                            <input type="radio" name="do_tweet" value="1">
-                            {tr}Yes{/tr}
-                            <input type="radio" name="do_tweet" value="0" checked="checked">
-                            {tr}No{/tr}
+                            <label class="col-form-label">
+                                <input type="radio" name="do_tweet" value="1">
+                                {tr}Yes{/tr}
+                            </label>
+                            <label class="col-form-label">
+                                <input type="radio" name="do_tweet" value="0" checked="checked">
+                                {tr}No{/tr}
+                            </label>
                         {else}
                             {remarksbox type="note" title="{tr}Note{/tr}"}
                                 <p><a href="tiki-socialnetworks.php" class="alert-link">{tr}Authorize with Twitter first{/tr}</a></p>
@@ -256,10 +260,14 @@
                     </td>
                     <td>
                         {if $facebook}
-                            <input type="radio" name="do_fb" value="1">
-                            {tr}Yes{/tr}
-                            <input type="radio" name="do_fb" value="0" checked="checked">
-                            {tr}No{/tr}
+                            <label class="col-form-label">
+                                <input type="radio" name="do_fb" value="1">
+                                {tr}Yes{/tr}
+                            </label>
+                            <label class="col-form-label">
+                                <input type="radio" name="do_fb" value="0" checked="checked">
+                                {tr}No{/tr}
+                            </label>
                         {else}
                             {remarksbox type="note" title="{tr}Note{/tr}"}
                                 <p><a href="tiki-socialnetworks.php" class="alert-link">{tr}Authorize with Facebook first{/tr}</a></p>



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7b15e5f9c8856c6e12accaa6acb2b77fdf38711c

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7b15e5f9c8856c6e12accaa6acb2b77fdf38711c
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.