From 275ce84c9576dd8a91377c266f8f2bb75387888f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 15 Jun 2016 10:51:34 -0400 Subject: [PATCH] Bug 16752 - Remove the use of event attributes from some acquisitions templates - Uncertain prices Content-Type: text/plain; charset="utf-8" This patch modifies the acquisitions uncertain prices template to remove event attributes onclick and onchange. Also changed on the uncertain prices page: Added a label to the orders filter, removed redundant form submit function. - Locate a vendor which has orders with uncertain prices - Click the 'Uncertain prices' tab in the left-hand sidebar - Enter invalid data in the "price" field for any order. Confirm that an error is triggered when the field loses focus. --- .../prog/en/modules/acqui/uncertainprice.tt | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index 1853805..6dbb71d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -13,18 +13,16 @@ ], "sPaginationType": "four_button" } ) ); + $(".check_uncertain").on("change",function(){ + var form = document.getElementById("uncertainprices"); + var ordernumber = $(this).data("ordernumber"); + uncheckbox( form, ordernumber ); + }); }); var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!"); //]]> - [% INCLUDE 'header.inc' %] @@ -75,10 +73,10 @@ function check(form) { [% END %]

Orders with uncertain prices

-
+ - Orders from: - [% IF ( owner ) %] @@ -89,7 +87,7 @@ function check(form) {
-
+ @@ -122,24 +120,21 @@ function check(form) { [% END %]
- + - [% IF Koha.Preference('AcqCreateItem') == 'ordering' %] [% uncertainpriceorder.quantity %] [% ELSE %] - + [% END %]
-
+
[% END %] -- 2.1.4