Bugzilla – Attachment 173758 Details for
Bug 33766
Accessibility: Fix ambiguous form-field in opac-auth.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33766: (follow-up) Fix ambiguous "Login" field
Bug-33766-follow-up-Fix-ambiguous-Login-field.patch (text/plain), 13.55 KB, created by
Martin Renvoize (ashimema)
on 2024-10-31 07:44:30 UTC
(
hide
)
Description:
Bug 33766: (follow-up) Fix ambiguous "Login" field
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-31 07:44:30 UTC
Size:
13.55 KB
patch
obsolete
>From e10a1a93584590b977eeac004d920d244ad05ebf Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Thu, 17 Aug 2023 14:48:33 +0000 >Subject: [PATCH] Bug 33766: (follow-up) Fix ambiguous "Login" field > >This follow-up fixes some problems w/ the unconventional >parts of the first commit. We now use conditionals in >a BLOCK to map the selected value from the preference >to string representations which should now be easily >translatable. > >To test: >- Check that the label for > - The masthead inc > - The opac-auth template > - The opac-main template > - The opac-password-recovery template > - The opac-registration-confirmation template > - The opac-reset-password template > - The sco-main template > reflect the changes you made to the syspref > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > ...-a11y_fix_ambiguous_form-field_in_opac-auth.tt.pl} | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 7 +++---- > .../opac-tmpl/bootstrap/en/includes/html_helpers.inc | 11 +++++++++++ > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- > .../bootstrap/en/modules/opac-password-recovery.tt | 3 ++- > .../en/modules/opac-registration-confirmation.tt | 3 ++- > .../bootstrap/en/modules/opac-reset-password.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 3 ++- > 10 files changed, 25 insertions(+), 12 deletions(-) > rename installer/data/mysql/atomicupdate/{bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt => bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt.pl} (89%) > >diff --git a/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt b/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt.pl >similarity index 89% >rename from installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt >rename to installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt.pl >index 3bb5322875f..290103bd97c 100755 >--- a/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt >+++ b/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt.pl >@@ -9,7 +9,7 @@ return { > > # Do you stuffs here > $dbh->do( >- q{INSERT IGNORE INTO systempreferences (variable,value) VALUES ('OPACLoginLabelTextContent','Cardnumber') } >+ q{INSERT IGNORE INTO systempreferences (variable,value) VALUES ('OPACLoginLabelTextContent','cardnumber') } > ); > > # sysprefs >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index a1a78620a53..6861a61ee4b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -186,9 +186,9 @@ OPAC: > - pref: OPACLoginLabelTextContent > default: Cardnumber > choices: >- Cardnumber: Cardnumber >- Username: Username >- "Cardnumber or Username": Cardnumber or Username >+ cardnumber: Cardnumber >+ username: Username >+ cardnumberorusername: Cardnumber or Username > - "as the text content of the userid input field's label." > - > - pref: OPACShowMusicalInscripts >@@ -542,7 +542,6 @@ OPAC: > type: textarea > syntax: text/html > class: code >- > - > - pref: OpacBrowseSearch > default: 0 >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >index 3be0de52fbe..55fd0dc1374 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >@@ -176,3 +176,14 @@ > [% t("Koha online catalog") | html %] > [% END %] > [% END %] >+ >+[% BLOCK login_label %] >+ [%- SET preference_value = Koha.Preference('OPACLoginLabelTextContent') %] >+ [%- SET label = "Cardnumber" %] >+ [%- IF preference_value == "username" %] >+ [%- SET label = "Username" %] >+ [%- ELSIF preference_value == "cardnumberorusername" %] >+ [%- SET label = "Cardnumber or Username" %] >+ [%- END %] >+ <label for="[% for | html %]">[% label | html %]:</label> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 201a1411b9c..312955ba47b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -438,7 +438,7 @@ > <input type="hidden" name="koha_login_context" value="opac" /> > <fieldset class="brief"> > <div class="local-login"> >- <label for="muserid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label><input type="text" id="muserid" name="login_userid" autocomplete="off" /> >+ [% PROCESS login_label for="muserid" %]<input type="text" id="muserid" name="login_userid" autocomplete="off" /> > <label for="mpassword">Password:</label><input type="password" id="mpassword" name="login_password" autocomplete="off" /> > <fieldset class="action"> > <input type="hidden" name="op" value="cud-login" /> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >index 4d5a29154d1..f1da03eae22 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -236,7 +236,7 @@ > <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" /> > [% END %] > <div class="form-group"> >- <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for="userid" %] > <input class="form-control" type="text" size="25" id="userid" name="login_userid" autocomplete="off" /> > </div> > <div class="form-group"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index 762e74ac8e3..942fc365d7e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -200,7 +200,7 @@ > <p>If you do not have an external account, but do have a local account, you can still log in: </p> > [% END # /IF identity_providers.size %] > <div class="local-login"> >- <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for='userid' %] > <input class="form-control" type="text" id="userid" name="login_userid" autocomplete="off" /> > <label for="password">Password:</label> > <input class="form-control" type="password" id="password" name="login_password" autocomplete="off" /> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >index f3c5ef3ebe5..8467a6faa45 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >@@ -2,6 +2,7 @@ > [% USE Koha %] > [% USE Categories %] > [% USE AdditionalContents %] >+[% PROCESS 'html_helpers.inc' %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -132,7 +133,7 @@ > <p>To reset your password, enter your login or your email address.</p> > <fieldset class="brief"> > <div class="form-group"> >- <label for="username">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for="username" %] > <input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> > </div> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >index 09ccc99bfd9..e03bccd6cc1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE Koha %] > [% USE AdditionalContents %] >+[% PROCESS 'html_helpers.inc' %] > [% SET OpacNavRight = AdditionalContents.get( location => "OpacNavRight", lang => news_lang, library => logged_in_user.branchcode || default_branch ) %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >@@ -109,7 +110,7 @@ > <input type="hidden" name="op" value="cud-login"> > <fieldset class="brief"> > <legend>Log in to your account:</legend> >- <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for="userid" %] > [% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %] > <input class="form-control" type="text" id="userid" size="10" name="login_userid" value="[% borrower.userid | html %]" autocomplete="off" /> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >index 4abd96b6f15..481c36e8660 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >@@ -75,7 +75,7 @@ > > <fieldset class="brief"> > <div class="form-group"> >- <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for="userid" %] > <input class="form-control" autocomplete="off" type="text" size="25" id="userid" name="userid" /> > </div> > <div class="form-group"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index df6280ffe2a..ab71079ba51 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -8,6 +8,7 @@ > [% USE AdditionalContents %] > [% USE Branches %] > [% SET SCOMainUserBlock = AdditionalContents.get( location => "SCOMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >+[% PROCESS 'html_helpers.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Self checkout › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >@@ -466,7 +467,7 @@ > <fieldset> > [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] > <legend>Log in to your account</legend> >- <label for="patronlogin">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> >+ [% PROCESS login_label for="patronlogin" %] > <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/> > <label for="patronpw">Password:</label> > <input type="password" id="patronpw" size="20" name="patronpw" autocomplete="off"/> >-- >2.47.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33766
:
151416
|
151427
|
154566
|
154567
|
154570
|
155017
|
155018
|
155019
|
155022
|
155023
|
155024
|
155025
|
155026
|
157854
|
157855
|
157856
|
157857
|
157858
|
159342
|
159546
|
159547
|
159548
|
159549
|
159550
|
168600
|
168601
|
168602
|
168603
|
168604
|
168605
|
173757
| 173758 |
173759
|
173760
|
173761
|
173762