@@ -, +, @@ --- .../prog/en/modules/acqui/neworderempty.tt | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -92,13 +92,16 @@ $(document).ready(function() }); [% END %] + //keep a copy of disabled budgets before removing them + disabledBudgetsCopy = $('#budget_id .b_inactive').clone(); + $('#budget_id .b_inactive').remove(); + $('#showallbudgets').click(function() { - if ( $('#budget_id .b_inactive').is(":visible") ) - { - $('#budget_id .b_inactive').hide(); + if ($(this).attr('checked') === true) { + $('#budget_id').prepend(disabledBudgetsCopy); // } else { - $('#budget_id .b_inactive').show(); + $('#budget_id .b_inactive').remove(); } }); }); @@ -333,7 +336,7 @@ $(document).ready(function() [% ELSE %] [% IF ( budget_loo.b_active ) %] - [% ELSE %] + [% ELSE %] [% END %] [% END %] [% END %] --