Bugzilla – Attachment 59814 Details for
Bug 18037
Hold notes template cleanup (from 15545)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18037: Hold notes template cleanup (from 15545)
Bug-18037-Hold-notes-template-cleanup-from-15545.patch (text/plain), 5.74 KB, created by
Marcel de Rooy
on 2017-02-02 13:24:13 UTC
(
hide
)
Description:
Bug 18037: Hold notes template cleanup (from 15545)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-02-02 13:24:13 UTC
Size:
5.74 KB
patch
obsolete
>From d1c902d2754aa46ac623d3a2939ffad20fcaf6c6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 15 Dec 2014 14:10:56 +0100 >Subject: [PATCH] Bug 18037: Hold notes template cleanup (from 15545) >Content-Type: text/plain; charset=utf-8 > >From the second patch of bug 15545: >Removing some unused template code related to a former approach. >Adding some changes for future extension by bug 15545. > >This patch was tested by Liz Rea when the routine IsHoldNoteRequired was >called by opac-reserve.pl. The only change here is that we do not yet >call this routine; so leaving her original signoff. > >Test plan: >[1] Enable OPACHoldNotes. >[2] Place a hold on a serial record. No behavior change. > >Signed-off-by: Liz Rea <liz@catalyst.net.nz> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 36 ++++++++++------------ > 1 file changed, 17 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index c0dd300..85d2d8a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -265,10 +265,11 @@ > [% IF ( OpacHoldNotes ) %] > <li> > <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> >- <label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> >- <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> >- <textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> >- <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> >+ <label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> >+ [% IF bibitemloo.reqholdnotes %] >+ <span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> >+ [% END %] >+ <textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> > </div> > </li> > [% END # / IF OpacHoldNotes %] >@@ -418,10 +419,6 @@ > <script type="text/javascript"> > // <![CDATA[ > var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); >- var ForceHoldNotesReasons=new Array( >- _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), >- "*** Add a new reason above this line ***" ); >- // NOTE: Do not renumber reasons; this will affect use of existing ones. > > // Clear the contents of an input field > $(".clearfield").on("click",function(e){ >@@ -481,17 +478,11 @@ > $("#reqspecific_[% bibitemloo.biblionumber %]").click(); > $("#copiesrow_[% bibitemloo.biblionumber %]").show(); > [% END %] >+ [% IF bibitemloo.reqholdnotes %] >+ $("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); >+ [% END %] > [% END %] > >- // Insert reasons for forced hold notes >- $(".forcenotesreason").each(function(){ >- biblioNum = suffixOf($(this).attr("id"), "_"); >- var j=$("#notesmandatory_"+biblioNum).val(); >- if(j>0) { >- $(this).html(ForceHoldNotesReasons[j-1]); >- } >- }); >- > $(".date-format").each(function(){ > if($(this).hasClass("to")){ var op = "to"; } > if($(this).hasClass("from")){ var op = "from"; } >@@ -601,11 +592,19 @@ > biblionumbers += biblioNum + "/"; > selections += biblioNum + "/"; > >+ // If required hold note is empty, make it visible >+ if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { >+ if( !$("#hold-options-"+biblioNum).is(':visible')) { >+ $("#toggle-hold-options-"+biblioNum).click(); >+ } >+ } >+ > // If the 'specific copy' radio button is checked > if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { > // Find the selected copy > var item = $(".checkitem_" + biblioNum + ":checked"); > if ($(item).size() == 0) { >+ alert(MSG_NO_ITEM_SELECTED); > badBib = biblioNum; > return false; > } else { >@@ -623,8 +622,7 @@ > return true; > }); > >- if (badBib) { >- alert(MSG_NO_ITEM_SELECTED); >+ if (badBib) { // alert has been raised already > return false; > } > >-- >2.1.4
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 18037
:
59814
|
59815
|
60461