From 57102aefde71f5def0ae66d83c701cd52680c233 Mon Sep 17 00:00:00 2001 From: Ion Agorria <ion@agorria.com> Date: Sat, 12 Dec 2015 01:38:24 +0100 Subject: [PATCH] Price expression selector fix --- htdocs/product/dynamic_price/editor.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/price.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index ba00d3be3bd..dc7c670f4cb 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -231,7 +231,7 @@ print '<script type="text/javascript"> window.location = "'.str_replace('dynamic_price/editor.php', $tab.'.php', $_SERVER["PHP_SELF"]).'?id='.$id.($tab == 'price' ? '&action=edit_price' : '').'"; } function on_change() { - window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").attr("value"); + window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").val(); } </script>'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index dab8d8dcf5d..04007d2ede1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -467,7 +467,7 @@ if ($id > 0 || $ref) window.location = "'.DOL_URL_ROOT.'/product/dynamic_price/editor.php?id='.$id.'&tab=fournisseurs&eid=" + $("#eid").attr("value"); } function on_change() { - if ($("#eid").attr("value") == 0) { + if ($("#eid").val() == 0) { jQuery("#price_numeric").show(); } else { jQuery("#price_numeric").hide(); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 3f16a20d98b..2a770841c60 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -841,13 +841,13 @@ if ($action == 'edit_price' && $object->getRights()->creer) <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#expression_editor").click(function() { - window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").attr("value"); + window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").val(); }); jQuery("#eid").change(on_change); on_change(); }); function on_change() { - if ($("#eid").attr("value") == 0) { + if ($("#eid").val() == 0) { jQuery("#price_numeric").show(); } else { jQuery("#price_numeric").hide(); -- GitLab