Bugzilla – Attachment 140954 Details for
Bug 30579
When placing item level hold, some options that are not used are not disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30579: (follow-up) Update layout to make hold any vs. hold item clearer
Bug-30579-follow-up-Update-layout-to-make-hold-any.patch (text/plain), 10.64 KB, created by
Nick Clemens (kidclamp)
on 2022-09-23 15:52:41 UTC
(
hide
)
Description:
Bug 30579: (follow-up) Update layout to make hold any vs. hold item clearer
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-23 15:52:41 UTC
Size:
10.64 KB
patch
obsolete
>From 2b7727b9a615361a084813b64e977de64c28278c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Sep 2022 15:47:24 +0000 >Subject: [PATCH] Bug 30579: (follow-up) Update layout to make hold any vs. > hold item clearer > >This patch alters the structure of the hold for a little more in order >to make it clear that "Hold next available" and "Hold specific item" are >two mutually-exclusive options. > >To test, apply the patch and rebuild the staff interface CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > >Perform the same tests as before: > >- Confirm you can successfully place single or multiple items on hold >- Confirm that when placing a single hold the next available options > are grouped >- Confirm pickup location, specific item type, and number of holds all > work for next available >- Confirm item level holds save pickup location correctly >--- > .../prog/css/src/staff-global.scss | 7 ++ > .../prog/en/modules/reserve/request.tt | 77 ++++++++++--------- > 2 files changed, 46 insertions(+), 38 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 9a111db1eb..c4e714de88 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -882,6 +882,13 @@ fieldset { > margin-left: 1em; > } > >+ label { >+ display: inline-block; >+ float: none; >+ margin: .2em; >+ width: auto; >+ } >+ > li { > clear: left; > float: left; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 8a0a2fdf1e..c96d895806 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -505,9 +505,9 @@ > </div> > > [% UNLESS ( multi_hold ) %] >- <fieldset class="rows"> >- <legend>Hold details</legend> >- <form action="placerequest.pl" method="post" name="form" id="hold-request-form"> >+ <form action="placerequest.pl" method="post" name="form" id="hold-request-form"> >+ <fieldset class="rows"> >+ <legend>Hold details</legend> > > <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> > [% FOREACH biblionumber IN biblionumbers %] >@@ -532,10 +532,6 @@ > <strong>[% fixedRank | html %]</strong> > </li> > >- <li> >- <label for="holdnotes">Notes:</label> >- <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> >- </li> > [% IF ( reserve_in_future ) %] > <li> > <label for="from">Hold starts on date:</label> >@@ -554,6 +550,10 @@ > <input name="non_priority" id="non_priority" type="checkbox" /> > <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> > </li> >+ <li> >+ <label for="holdnotes">Notes:</label> >+ <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> >+ </li> > </ol> > <fieldset class="rows"> > <legend> >@@ -602,7 +602,6 @@ > <input type="hidden" name="holds_to_place_count" value="1" /> > [% END %] > </ol> >- </fieldset> > > > <fieldset class="action"> >@@ -616,7 +615,20 @@ > [% END %] > [% END %] > </fieldset> >+ </fieldset> >+ >+ <hr/> > >+ <fieldset class="rows"> >+ <legend> >+ <label> >+ Place a hold on a specific item >+ <input type="radio" name="request" class="requestany" /> >+ </label> >+ [% IF force_hold_level == 'item' %] >+ <span class="error"><em>(Required)</em></span> >+ [% END %] >+ </legend> > [% biblio = biblioloop.0 %] > > <ol> >@@ -635,12 +647,6 @@ > [% END %] > </ol> > >- <h2 style="padding: 0 1em;"> >- Place a hold on a specific item >- [% IF force_hold_level == 'item' %] >- <span class="error"><em>(Required)</em></span> >- [% END %] >- </h2> > > <table id="requestspecific"> > <thead> >@@ -676,9 +682,9 @@ > Hold must be record level > </span> > [% ELSIF ( itemloo.available ) %] >- <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> >+ <input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" /> > [% ELSIF ( itemloo.override ) %] >- <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> >+ <input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" /> > <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> > [% ELSE %] > <span class="error"> >@@ -723,7 +729,7 @@ > </td> > <td> > [% IF (itemloo.pickup_locations_count > 0) %] >- <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;" >+ <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;" > data-item-id="[% itemloo.itemnumber | html %]" > data-patron-id="[% patron.borrowernumber | html %]" > data-pickup-location-source="item"> >@@ -837,11 +843,9 @@ > </table> <!-- /#requestspecific --> > > [% IF hiddencount %] >- <form> >- <p class="hiddencount"> >- <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a> >- </p> >- </form> >+ <p class="hiddencount"> >+ <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a> >+ </p> > [% END # /IF hiddencount %] > > [% ELSE # /UNLESS multi_hold %] >@@ -977,8 +981,8 @@ > [% END %] > [% END # /IF patron %] > </fieldset> <!-- /.action --> >- </form> <!-- /#hold-request-form --> >- </fieldset> <!-- /.rows --> >+ </fieldset> <!-- /.rows --> >+ </form> <!-- /#hold-request-form --> > [% END %] > > [% UNLESS ( patron ) %] >@@ -1289,15 +1293,8 @@ > } > > >- function ToggleHoldsToPlace() { >- if ( $("#requestany").prop('checked') ) { >- $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false); >- } else { >- $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true); >- } >- } > ToggleHoldsToPlace(); >- $("#requestany").on('change', function(){ >+ $(".requestany").on('change', function(){ > ToggleHoldsToPlace(); > }); > >@@ -1316,12 +1313,6 @@ > "sDom": '<"top pager"ilf>t', > })); > >- //Override fieldset styling for dataTables search box >- $("div.top.pager").css("margin-left","1em"); >- $(".dataTables_filter label").css({ >- "width":"auto", >- "margin-right":"0em" >- }); > > $("#club-request-form").on("submit", function() { > let $t = $(this); >@@ -1421,6 +1412,16 @@ > }); > }); > >+ function ToggleHoldsToPlace() { >+ if ( $("#requestany").prop('checked') ) { >+ $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', false); >+ $(".requestspecific").prop("disabled", true ); >+ } else { >+ $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', true); >+ $(".requestspecific").prop("disabled", false ); >+ } >+ } >+ > function check( table ) { > > var msg = ""; >-- >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 30579
:
133549
|
133550
|
133574
|
133575
|
133689
|
133690
|
134270
|
134468
|
134469
|
134491
|
134492
|
134493
|
134893
|
134894
|
140951
|
140952
|
140953
|
140954
|
148835
|
148898
|
149271
|
150767
|
150786
|
151483
|
151493
|
151558
|
154881
|
154882
|
154883
|
154886
|
157787
|
157788
|
157789
|
157790
|
157791
|
157792
|
157937
|
157938
|
157939
|
157940
|
157941
|
157942
|
157943
|
163260
|
163261
|
163262
|
163263
|
163264
|
163265
|
163266
|
163267
|
166012
|
166013
|
166014
|
166015
|
166016
|
166017
|
166018
|
166019
|
166034
|
166035
|
166036
|
166037
|
166038
|
166039
|
166040
|
166041
|
166074
|
166075
|
166076
|
166077
|
166078
|
166079
|
166080
|
166081
|
166082
|
166264
|
166265
|
166266
|
166267
|
166268
|
166269
|
166270
|
166271
|
166272
|
166273
|
166274
|
166275