Bugzilla – Attachment 27712 Details for
Bug 9088
neworderempty should preselect the only active fund for new orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9088: Neworderempty should preselect the only active fund
Bug-9088-Neworderempty-should-preselect-the-only-a.patch (text/plain), 4.11 KB, created by
Marcel de Rooy
on 2014-04-28 09:37:31 UTC
(
hide
)
Description:
Bug 9088: Neworderempty should preselect the only active fund
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-04-28 09:37:31 UTC
Size:
4.11 KB
patch
obsolete
>From ee2e95fef960f932fe136757accbdb1066d4b4aa Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 3 Apr 2014 14:15:11 +0200 >Subject: [PATCH] Bug 9088: Neworderempty should preselect the only active > fund >Content-Type: text/plain; charset=utf-8 > >This patch makes the following changes to the template: > >[1] If you add an order line, and you have one active fund (and zero or > more inactive funds), the only active fund is preselected. >[2] If you modify an order line while its fund is inactive, it now shows > the label (inactive) behind the fund name. (Note that other inactive funds > may come up when clicking 'Show all' as they did before.) >[3] Corrected some indentation in this template part. > >Test plan: > >[1] Add an order line while having one active fund. Is it selected? >[2] Add an order line while having two or more active funds. No fund > should be preselected. >[3] Modify an order line with an active fund. Is it still selected? >[4] Modify an order line with an inactive fund F2 (while having one active > fund F1; note that this test explicitly wants F1 to be before F2). > Check if F2 is selected and is labeled inactive. >[5] (Bonus points:) Modify an order line that refers to a deleted fund. > If you edit this order, the fund combo should say: Select a fund. > (Note: if you delete a fund, the budget_id in aqorders remains.) >--- > .../prog/en/modules/acqui/neworderempty.tt | 26 +++++++++++++------ > 1 files changed, 18 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index e1d9ad5..2824766 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -415,17 +415,27 @@ $(document).ready(function() > <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %] > [% ELSE %] > <label class="required" for="budget_id">Fund: </label> >+ [% active_count = 0 %] >+ [% IF !ordernumber %] >+ [% FOREACH budget_loo IN budget_loop %] >+ [% active_count= active_count + budget_loo.b_active %] >+ [% END %] >+ [% END %] > <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id"> >- <option value="">Select a fund</option> >- [% FOREACH budget_loo IN budget_loop %] >- [% IF ( budget_loo.b_sel ) %] >- <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option> >- [% ELSE %] >- [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option> >- [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %] (inactive)</option> >+ <option value="">Select a fund</option> >+ [% FOREACH budget_loo IN budget_loop %] >+ [% IF budget_loo.b_sel %] >+ [% active_count = 0 #select no other fund %] >+ <option value="[% budget_loo.b_id %]" selected="selected"> >+ [% ELSIF active_count==1 && budget_loo.b_active %] >+ <option value="[% budget_loo.b_id %]" selected="selected"> >+ [% ELSE %] >+ [% bdgclass=budget_loo.b_active? "": "b_inactive" %] >+ <option value="[% budget_loo.b_id %]" class="[% bdgclass %]"> > [% END %] >+ [% budget_loo.b_txt %][% IF !budget_loo.b_active %] (inactive)[% END %] >+ </option> > [% END %] >- [% END %] > </select> > <label for="showallbudgets" style="float:none;width:auto;"> Show all:</label> > <input type="checkbox" id="showallbudgets" /> >-- >1.7.7.6
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 9088
:
13460
|
13461
|
14957
|
14958
|
26790
|
27067
|
27188
|
27191
|
27712
|
28043
|
28142
|
28291