Bugzilla – Attachment 135455 Details for
Bug 26377
Clearly label parts of subscription-add.pl that relate to optional item records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records
Bug-26377-Clearly-label-parts-of-subscription-addp.patch (text/plain), 3.78 KB, created by
David Nind
on 2022-05-31 02:00:13 UTC
(
hide
)
Description:
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-31 02:00:13 UTC
Size:
3.78 KB
patch
obsolete
>From 37cd04a18c33c52519e6afd225ad0dba7a802696 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 12 May 2022 16:25:05 +0000 >Subject: [PATCH] Bug 26377: Clearly label parts of subscription-add.pl that > relate to optional item records > >This patch modifies the form for adding a new subscription so that the >collection and item type fields are shown only when the subscription is >configured to create an item when receiving. > >To test, apply the patch and go to Serials -> New subscription. > >- When the page first loads, the "Do not create an item record when > receiving this serial" radio button should be selected. >- Under the "Location" field there should be no item type or collection > field. >- Select the "Create an item when receiving this serial" radio button. >- The item type and collection fields should appear. >- Test that the values are correctly saved when you add or edit a > subscription. >- If you edit a subscription which had item type and collection defined, > and you switch to "Do not create an item..." the record should save with > empty values for those fields. >- Confirm that existing subscriptions open with the correct settings > applied: Only records with "Create an item..." checked should open > with the item type and collection fields displayed. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../en/modules/serials/subscription-add.tt | 4 ++-- > .../intranet-tmpl/prog/js/subscription-add.js | 20 +++++++++++++++++++ > 2 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 53760cf4fb..c22a621ee7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -199,7 +199,7 @@ fieldset.rows table { clear: none; margin: 0; } > [% END %] > </select> > </li> >- <li> >+ <li class="use_items" style="display:none"> > <label for="ccode">Collection:</label> > <select name="ccode" id="ccode"> > <option value="">None</option> >@@ -212,7 +212,7 @@ fieldset.rows table { clear: none; margin: 0; } > [% END %] > </select> > </li> >- <li> >+ <li class="use_items" style="display:none"> > <label for="itemtype">Item type:</label> > <select name="itemtype" id="itemtype"> > <option value=""></option> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 557b5b18a7..7d5445fce8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -726,4 +726,24 @@ $(document).ready(function() { > }); > }); > >+ if( $("#serialsadditems-yes").prop("checked") ){ >+ $(".use_items").show(); >+ } >+ >+ $("#serialsadditems-yes").on("change", function(){ >+ if( $(this).prop("checked") ){ >+ $(".use_items").show(); >+ } else { >+ $(".use_items").hide().find("select").val(""); >+ } >+ }); >+ >+ $("#serialsadditems-no").on("change", function(){ >+ if( $(this).prop("checked") ){ >+ $(".use_items").hide().find("select").val(""); >+ } else { >+ $(".use_items").show(); >+ } >+ }); >+ > }); >-- >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 26377
:
134968
|
135355
|
135455
|
135479
|
135480
|
135491
|
135492
|
135500
|
135501
|
135502