Bugzilla – Attachment 141972 Details for
Bug 24606
Allow storing item values as a template for creating new items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24606: (QA follow-up) Set existing sharing setting when updating existing template
Bug-24606-QA-follow-up-Set-existing-sharing-settin.patch (text/plain), 2.82 KB, created by
Kyle M Hall (khall)
on 2022-10-17 13:35:54 UTC
(
hide
)
Description:
Bug 24606: (QA follow-up) Set existing sharing setting when updating existing template
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-10-17 13:35:54 UTC
Size:
2.82 KB
patch
obsolete
>From e2fd22a22af714765a394a7d269a77a1cf4c637a Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 17 Oct 2022 09:35:13 -0400 >Subject: [PATCH] Bug 24606: (QA follow-up) Set existing sharing setting when > updating existing template > >--- > .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js | 5 ++++- > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 3d7d447854..67bd00f3cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -272,12 +272,12 @@ > <option value="0" selected="selected">Save as new template</option> > <optgroup label="Update existing template"> > [% FOREACH t IN item_templates.owned %] >- <option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> >+ <option data-editor="1" data-shared="[% t.is_shared %]" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> > [% END %] > [% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %] > <optgroup label="Update shared template"> > [% FOREACH t IN item_templates.shared %] >- <option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> >+ <option data-editor="1" data-shared="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> > [% END %] > </optgroup> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index 1f9f5e2964..3e6f5e53bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -93,10 +93,13 @@ $(document).ready(function(){ > }); > $("#template_id").change(); // Trigger to enable delete button if patron's template is in use > $("#replace_template_id").on("change", function() { >- if ( $(this).find(":selected").val() > 0 ) { >+ let selected = $(this).find(":selected"); >+ if ( selected.val() > 0 ) { > $("#template_name_block").hide(); >+ $("#template_is_shared").prop("checked", selected.data("shared")); > } else { > $("#template_name_block").show(); >+ $("#template_is_shared").prop("checked", false); > } > }); > >-- >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 24606
:
141613
|
141614
|
141615
|
141616
|
141617
|
141717
|
141718
|
141719
|
141720
|
141721
|
141972
|
142003
|
142004
|
142005
|
142006
|
142007
|
142008
|
142833
|
142834
|
142835
|
142836
|
142837
|
142877
|
142878
|
142879
|
142880
|
142881
|
142882
|
142883
|
142884
|
142885
|
142886
|
142887
|
142888
|
143020
|
143569
|
143570
|
143571
|
143572
|
143573
|
143574
|
143575
|
143576
|
143577
|
143578
|
143579
|
143580
|
143581
|
143794
|
143795
|
143796
|
143989
|
143990
|
144161