Bugzilla – Attachment 77521 Details for
Bug 20970
Reformat basket information on acquisitions basket page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20970: (follow-up) Reformat basket information on acquisitions basket page
Bug-20970-follow-up-Reformat-basket-information-on.patch (text/plain), 9.41 KB, created by
Owen Leonard
on 2018-08-07 13:04:55 UTC
(
hide
)
Description:
Bug 20970: (follow-up) Reformat basket information on acquisitions basket page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-08-07 13:04:55 UTC
Size:
9.41 KB
patch
obsolete
>From ef6daecce8478855cd2bfe86bdfb98a9b0dfbd82 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 7 Aug 2018 12:49:15 +0000 >Subject: [PATCH] Bug 20970: (follow-up) Reformat basket information on > acquisitions basket page > >This patch adds auto-submit to the branch and basket group selection >forms. > >To test, apply the patch and view a basket in acquisitions. Test the >process of changing the managing library and basket group. In both >cases, selecting an choice from the dropdown should automatically submit >the form. > >Test as a user with and without permission to manage basket groups. >--- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 89 +++++++++++----------- > 1 file changed, 44 insertions(+), 45 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index ae9fc4b..a2b7149 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -257,7 +257,7 @@ > <span class="label"> </span> > <div style="float:left"> > <form action="" method="post"> >- <select id="branch" name="branch" style="max-width:10em;"> >+ <select id="select_managing_library" name="branch" style="max-width:10em;"> > <option value="">(no library)</option> > [% FOREACH branch IN branches_loop %] > [% IF (branch.selected) %] >@@ -267,12 +267,9 @@ > [% END %] > [% END %] > </select> >+ <a id="library_entry_cancel" href="#" class="cancel">Cancel</a> > <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" /> > <input type="hidden" id="op" name="op" value="mod_branch" /> >- <p> >- <button type="submit" class="btn btn-default btn-xs">Save</button> >- <a id="library_entry_cancel" href="#" class="cancel">Cancel</a> >- </p> > </form> > </div> > </li> >@@ -307,9 +304,6 @@ > </ol> > > [% IF ( closedate ) %] >- [% IF ( CAN_user_acquisition_group_manage ) %] >- <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"> >- [% END %] > <ol> > <li> > <span class="label">Basket group:</span> >@@ -330,47 +324,47 @@ > No group > [%- END -%] > [% ELSE %] >- [% IF ( basketgroup.id ) %] >- [% basketgroup.name %] >- <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Change basket group</a> >- [% ELSE %] >- No group >- <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Set basket group</a> >- [% END %] >- </li> >- <li id="basket_grouping" style="display:none;"> >- <span class="label"> </span> >- <div style="float:left"> >- <select id="basketgroupid" name="basketgroupid"> >- <option value="">No group</option> >- [% FOREACH bg IN basketgroups %] >- [% IF ( bg.default ) %] >- <option value="[% bg.id %]" selected="selected">[% bg.name %]</option> >- [% ELSE %] >- [% UNLESS bg.closed %] >- <option value="[% bg.id %]">[% bg.name %]</option> >- [% ELSE %] >- <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option> >- [% END %] >- [% END %] >+ [% IF ( CAN_user_acquisition_group_manage ) %] >+ [% IF ( basketgroup.id ) %] >+ [% basketgroup.name %] >+ <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Change basket group</a> >+ [% ELSE %] >+ No group >+ <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Set basket group</a> > [% END %] >- <option value="new">Add new group</option> >- </select> >- <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> >- <input type="hidden" value="mod_basket" name="op" /> >- <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >- <p> >- <button type="submit" class="btn btn-default btn-xs">Save</button> >- <a href="#" id="basket_group_cancel" class="cancel">Cancel</a> >- </p> >- </div> >+ [% END %] > [% END %] > </li> >+ [% IF ( CAN_user_acquisition_group_manage ) %] >+ <li id="basket_grouping" style="display:none;"> >+ <span class="label"> </span> >+ <div style="float:left"> >+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"> >+ <select id="basketgroupid" name="basketgroupid"> >+ <option value="">No group</option> >+ [% FOREACH bg IN basketgroups %] >+ [% IF ( bg.default ) %] >+ <option value="[% bg.id %]" selected="selected">[% bg.name %]</option> >+ [% ELSE %] >+ [% UNLESS bg.closed %] >+ <option value="[% bg.id %]">[% bg.name %]</option> >+ [% ELSE %] >+ <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option> >+ [% END %] >+ [% END %] >+ [% END %] >+ <option value="new">Add new group</option> >+ </select> >+ <a href="#" id="basket_group_cancel" class="cancel">Cancel</a> >+ <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> >+ <input type="hidden" value="mod_basket" name="op" /> >+ <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >+ </form> >+ </div> >+ </li> >+ [% END # /IF ( CAN_user_acquisition_group_manage ) %] > </ol> >- [% IF ( CAN_user_acquisition_group_manage ) %] >- </form> >- [% END %] >- [% END %] >+ [% END # /IF closeddate %] > </div> > </div> > </div> >@@ -861,6 +855,8 @@ > $("#basketgroupid").change(function(){ > if($(this).val() == "new"){ > location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]"; >+ } else { >+ $(this).parent().submit(); > } > }); > }); >@@ -909,6 +905,9 @@ > location.href = url; > return false; > }); >+ $("#select_managing_library").on("change", function(){ >+ $(this).parent().submit(); >+ }); > }); > > function UserSearchPopup(f) { >-- >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 20970
:
76213
|
76214
|
77498
|
77521
|
79172
|
80354
|
80954
|
81028
|
81029