X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Facqui%2Fneworderempty.tmpl;h=0eacf1972ed38ce3188cda3a783fd34e45cbcd40;hb=36efd0d4d0cfe5bbdcd9a4b48e0e417a59aaa63a;hp=53c0474454cc74caf337ca753c7e2235135263f2;hpb=1e98195b1014f9b0680be9d6ea9e8e8132821158;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 53c0474454..0eacf1972e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -18,6 +18,11 @@ function Check(ff) { ok=1; _alertString += "\n- " + _("Title cannot be empty"); } + + if(isNull(ff.budget_id,1)){ + ok=1; + _alertString += "\n- "+ _("You must select a budget"); + } if (!(isNum(ff.quantity,0))){ ok=1; @@ -64,7 +69,39 @@ ff.submit(); } - +$(document).ready(function() + { + //We apply the fonction only for modify option + + $('#quantity').blur(function() + { + // if user decreases the quantity + if($(this).val() < ) + { + alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog")); + return true; + } + else + { + // if user increases the quantity + alert(_("You can't add a new item, please create a new order line")); + // and we replace the original value + $(this).val() + return false; + } + }); + + + $('#showallbudgets').click(function() { + if ( $('#budget_id .b_inactive').is(":visible") ) + { + $('#budget_id .b_inactive').hide(); + } + else { + $('#budget_id .b_inactive').show(); + } + }); + }); //]]> @@ -83,7 +120,7 @@ ff.submit();