Bugzilla – Attachment 159546 Details for
Bug 33766
Fix ambiguous form field in OPAC login form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33766: Fix ambiguous "Login" field
Bug-33766-Fix-ambiguous-Login-field.patch (text/plain), 12.15 KB, created by
Owen Leonard
on 2023-12-04 17:01:09 UTC
(
hide
)
Description:
Bug 33766: Fix ambiguous "Login" field
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-12-04 17:01:09 UTC
Size:
12.15 KB
patch
obsolete
>From 859a1bf1c8903d4725e966c9a20c99bbfe032874 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Thu, 17 Aug 2023 12:31:08 +0000 >Subject: [PATCH] Bug 33766: Fix ambiguous "Login" field > >This patch introduces a new syspref 'OPACLoginLabelTextContent' which can be set >to the following values >- Cardnumber >- Username >- Cardnumber or Username > >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> >--- > ...1y_fix_ambiguous_form-field_in_opac-auth.tt | 18 ++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../en/modules/admin/preferences/opac.pref | 10 ++++++++++ > .../bootstrap/en/includes/masthead.inc | 2 +- > .../bootstrap/en/modules/opac-auth.tt | 2 +- > .../bootstrap/en/modules/opac-main.tt | 2 +- > .../en/modules/opac-password-recovery.tt | 2 +- > .../modules/opac-registration-confirmation.tt | 2 +- > .../en/modules/opac-reset-password.tt | 2 +- > .../bootstrap/en/modules/sco/sco-main.tt | 2 +- > 10 files changed, 36 insertions(+), 7 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt > >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 >new file mode 100755 >index 0000000000..3bb5322875 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33766-a11y_fix_ambiguous_form-field_in_opac-auth.tt >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33766", >+ description => "Add syspref to determine text content of userid input field's label.", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ $dbh->do( >+ q{INSERT IGNORE INTO systempreferences (variable,value) VALUES ('OPACLoginLabelTextContent','Cardnumber') } >+ ); >+ >+ # sysprefs >+ say $out "Added new system preference 'OPACLoginLabelTextContent'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b58114d802..e3264ecf45 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -489,6 +489,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'), > ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'), > ('OpacLocationOnDetail','holding','holding|home|both|column','In the OPAC detail, display the shelving location on its own column or under a library columns.', 'Choice'), >+('OPACLoginLabelTextContent','Cardnumber',NULL,NULL,NULL), > ('OPACMandatoryHoldDates', '', '|start|end|both', 'Define which hold dates are required on OPAC reserve form', 'Choice'), > ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), > ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'), >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 a68e7eaa2d..0f818689b8 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 >@@ -165,6 +165,15 @@ OPAC: > column: "on a separate column" > - "for items on the OPAC record details page." > - "<br />Note: If 'on a separate column' is selected, you still need to enable the item_shelving_location display on the <a href='/cgi-bin/koha/admin/columns_settings.pl'>configure columns</a> administration page." >+ - >+ - Use >+ - pref: OPACLoginLabelTextContent >+ default: Cardnumber >+ choices: >+ Cardnumber: Cardnumber >+ Username: Username >+ "Cardnumber or Username": Cardnumber or Username >+ - "as the text content of the userid input field's label." > - > - pref: OPACShowMusicalInscripts > default: 0 >@@ -517,6 +526,7 @@ OPAC: > type: textarea > syntax: text/html > class: code >+ > - > - pref: OpacBrowseSearch > default: 0 >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index bec516757f..225ff49fb8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -426,7 +426,7 @@ > <input type="hidden" name="koha_login_context" value="opac" /> > <fieldset class="brief"> > <div class="local-login"> >- <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" autocomplete="off" /> >+ <label for="muserid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label><input type="text" id="muserid" name="userid" autocomplete="off" /> > <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" autocomplete="off" /> > <fieldset class="action"> > <input type="submit" class="btn btn-primary" value="Log in" /> >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 f76ded9c5f..5ab6cf0a5d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -218,7 +218,7 @@ > <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" /> > [% END %] > <div class="form-group"> >- <label for="userid">Login:</label> >+ <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > <input class="form-control" type="text" size="25" id="userid" name="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 8e616f02a7..986019d787 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -197,7 +197,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">Login:</label> >+ <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > <input class="form-control" type="text" id="userid" name="userid" autocomplete="off" /> > <label for="password">Password:</label> > <input class="form-control" type="password" id="password" name="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 8be44f786e..d38d1eb74f 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 >@@ -121,7 +121,7 @@ > <p>To reset your password, enter your login or your email address.</p> > <fieldset class="brief"> > <div class="form-group"> >- <label for="username">Login:</label> >+ <label for="username">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > <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 0bc8e13285..2b292e9967 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 >@@ -90,7 +90,7 @@ > <input type="hidden" name="koha_login_context" value="opac" /> > <fieldset class="brief"> > <legend>Log in to your account:</legend> >- <label for="userid">Login:</label> >+ <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > [% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %] > <input class="form-control" type="text" id="userid" size="10" name="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 54eface998..3f1797b56a 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 >@@ -74,7 +74,7 @@ > > <fieldset class="brief"> > <div class="form-group"> >- <label for="userid">Login:</label> >+ <label for="userid">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > <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 5f8e8eee3e..b10be2f572 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 >@@ -448,7 +448,7 @@ > <fieldset> > [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] > <legend>Log in to your account</legend> >- <label for="patronlogin">Login:</label> >+ <label for="patronlogin">[% Koha.Preference('OPACLoginLabelTextContent') | html %]:</label> > <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.30.2
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
|
173972
|
173973
|
173974
|
173975
|
173976
|
173977
|
174037
|
174038
|
174039
|
174040
|
174041
|
174042