From 1865eb4392f352394f21505a26b88e32e5f9cefc Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Tue, 24 Aug 2010 11:54:41 +0200 Subject: [PATCH] Bug 5949 : Popup alert when deleting items from basket, also change planning value to statistics (MT #2391) : acqui/neworderempty.pl Multiple fixes in neworderempty.pl, mainly about Modify order line page, link to edit catalog, user can delete items with popup information and can't add items also with popup explanation. --- .../prog/en/modules/acqui/neworderempty.tmpl | 35 ++++++++++++++++--- 1 files changed, 29 insertions(+), 6 deletions(-) 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 76f5a3f..fd03db4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -63,8 +63,29 @@ if (ok) { 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; + } + }); + + }); //]]> @@ -83,7 +104,7 @@ ff.submit();

- Modify order details (line #) + Modify order line New order @@ -161,6 +182,8 @@ ff.submit(); " /> + + ">Edit Catalog
  • @@ -361,10 +384,10 @@ ff.submit();
  • - +
  • The 2 following fields are available for your own usage. They can be useful for statistical purposes
    - + @@ -374,7 +397,7 @@ ff.submit();
  • - + -- 1.7.1