Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order
The rendering of SELECT elements is up to the browser.
But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers.
This patch replace CSS style attribute with   html entity.
On supported platforms
TEST PLAN :
1. Go to the Administration module
2. Add a new budget (ie : Budget 2020)
3. Add a fund to this budget (ie : Book)
4. Add a sub-fund to fund Book (ie : Adult fiction)
You will have this hierarchy :
Budget 2020
|____ Book
|_____ Adult fiction
5. Go to the Acquisition module
6. Select a vendor and create a new basket
7. Place an order
8. Check the budget dropdown menu
BEFORE PATCH
Book
Adult fiction
OR
Book
Adult fiction
AFTER PATCH
Book
Adult fiction
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
2213cb9152
commit
008b51d4d5
|
|
@ -369,22 +369,26 @@
|
|||
<select id="budget_id" name="budget_id">
|
||||
<option value="">Select a fund</option>
|
||||
[% FOREACH budget_loo IN budget_loop %]
|
||||
[% level_indent_cnt = 0 %]
|
||||
[% level_indent = "" %]
|
||||
[% WHILE level_indent_cnt < budget_loo.b_level %]
|
||||
[% level_indent = level_indent _ " " %]
|
||||
[% level_indent_cnt = level_indent_cnt +1 %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( budget_loo.b_sel ) %]
|
||||
[% active_count = 0 #select no other fund %]
|
||||
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
|
||||
style="padding-left:[% budget_loo.b_level | html %]em;"
|
||||
>
|
||||
[% ELSIF active_count==1 && budget_loo.b_active %]
|
||||
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
|
||||
style="padding-left:[% budget_loo.b_level | html %]em;"
|
||||
>
|
||||
[% ELSE %]
|
||||
[% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
|
||||
<option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
|
||||
style="padding-left:[% budget_loo.b_level | html %]em;"
|
||||
>
|
||||
[% END %]
|
||||
[% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
|
||||
[% level_indent | $raw %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
|
||||
</option>
|
||||
[% END %]
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue