From 1f323c00a14673ae83ae24b2502aa172d7949781 Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Mon, 4 Apr 2011 12:29:36 +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. Signed-off-by: Katrin Fischer - changed the the link from 'Edit Catalog' to 'Edit record' (like on result list) - changed position of 'Edit record' to be shown behind the label 'Catalog details' instead of showing behind the Title. Signed-off-by: Chris Cormack --- .../prog/en/modules/acqui/neworderempty.tmpl | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 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 410ddd23bf..2cdc1ff581 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -68,8 +68,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; + } + }); + + }); //]]> @@ -88,7 +109,7 @@ ff.submit();

- Modify order details (line #) + Modify order line New order @@ -137,7 +158,10 @@ ff.submit();
- Catalog details + + Catalog details + "> Edit record + @@ -366,10 +390,10 @@ ff.submit();
  • - +
  • The 2 following fields are available for your own usage. They can be useful for statistical purposes
    - + @@ -379,7 +403,7 @@ ff.submit();
  • - + -- 2.39.5