Bugzilla – Attachment 166772 Details for
Bug 36844
Set library, desk, and cash register menu follow-ups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36844: (QA follow-up) Fix preselected options on set-library.pl
Bug-36844-QA-follow-up-Fix-preselected-options-on-.patch (text/plain), 4.04 KB, created by
Nick Clemens (kidclamp)
on 2024-05-15 11:55:20 UTC
(
hide
)
Description:
Bug 36844: (QA follow-up) Fix preselected options on set-library.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-05-15 11:55:20 UTC
Size:
4.04 KB
patch
obsolete
>From ce5c5aee219745d3ca996860bf57bb0a2fe5ec73 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 15 May 2024 11:51:54 +0000 >Subject: [PATCH] Bug 36844: (QA follow-up) Fix preselected options on > set-library.pl > >I found that when switching from a branch with a default register to one without, the default register for >the last branch was remaining selected (though disabled) > >When opening the page if no desk was set (choose 'My library' on initial login) the branch was default to 'No desk' rather than defaulting to the first desk of the current branch > >Remove a debugging line as well > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index cbac52202b9..872388b3177 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -12,7 +12,7 @@ > <option id="nodesk" value="">---</option> > [% FOREACH d IN desks %] > [% IF d.branchcode == branch %] >- [% IF selected == d.desk_id %] >+ [% IF selected == d.desk_id || ( selected == '' && loop.first ) %] > <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" selected="selected">[% d.desk_name | html %]</option> > [% ELSE %] > <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" >[% d.desk_name | html %]</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >index 79897c6cffa..23b4ca6dba0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >@@ -74,7 +74,7 @@ > <ol> > <li><label for="set-library-desk_id">Choose desk:</label> > <select name="desk_id" id="set-library-desk_id"> >- [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id %] >+ [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id, branch => branch %] > </select></li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index e2b9d175d9b..63cdb2ca566 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -305,7 +305,6 @@ $(document).ready(function () { > $("#set-library-desk_id") > .children() > .each(function () { >- console.log( $(this) ); > if ($(this).attr("id") === "nodesk") { > // set no desk by default, should be first element > $(this).prop("selected", true); >@@ -316,7 +315,7 @@ $(document).ready(function () { > $("#nodesk").hide(); > $(this).prop("disabled", false); > $(this).show(); >- if ( selectedBranch == $(".logged-in-branch-code").html() ) { >+ if ( selectedBranch == $(".logged-in-branch-code").html() && $(".logged-in-desk-id").length ) { > $("#set-library-desk_id").val( $(".logged-in-desk-id").html() ); > } else { > $("#nodesk").hide(); >@@ -330,6 +329,7 @@ $(document).ready(function () { > } > }); > >+ $("#set-library-register_id").val(""); > $("#set-library-register_id").children().each(function() { > // default to no-register > if ($(this).is("#noregister")) { >-- >2.39.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 36844
:
166651
|
166657
|
166662
|
166665
|
166666
|
166770
|
166771
| 166772