From a104de27fec019cba4753e26273654e634fa8de6 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 27 Jun 2013 22:59:32 +0200 Subject: [PATCH] Fixed nested forms in Items tab. --- inventory/cost_update.php | 11 +++++------ inventory/prices.php | 11 +++++------ inventory/purchasing_data.php | 11 +++++------ inventory/reorder_level.php | 12 +++++------- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 3afe0b6..75f04a0 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -84,10 +84,8 @@ if (list_updated('stock_id')) $Ajax->activate('cost_table'); //----------------------------------------------------------------------------------------- -$action = $_SERVER['PHP_SELF']; -if (@$_GET['popup']) - $action .= "?stock_id=".get_post('stock_id'); -start_form(false, false, $action); +if (!@$_GET['popup']) + start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); @@ -137,8 +135,9 @@ end_table(1); div_end(); submit_center('UpdateData', _("Update"), true, false, 'default'); -end_form(); if (!@$_GET['popup']) +{ + end_form(); end_page(@$_GET['popup'], false, false); - +} ?> diff --git a/inventory/prices.php b/inventory/prices.php index f1c63c4..66d3bee 100644 --- a/inventory/prices.php +++ b/inventory/prices.php @@ -50,11 +50,8 @@ if (!isset($_POST['curr_abrev'])) } //--------------------------------------------------------------------------------------------------- - -$action = $_SERVER['PHP_SELF']; -if (@$_GET['popup']) - $action .= "?stock_id=".get_post('stock_id'); -start_form(false, false, $action); +if (!@$_GET['popup']) + start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); @@ -211,7 +208,9 @@ if ($calculated) submit_add_or_update_center($selected_id == -1, '', 'both'); div_end(); -end_form(); if (!@$_GET['popup']) +{ + end_form(); end_page(@$_GET['popup'], false, false); +} ?> diff --git a/inventory/purchasing_data.php b/inventory/purchasing_data.php index 1b4602e..d0b1685 100644 --- a/inventory/purchasing_data.php +++ b/inventory/purchasing_data.php @@ -106,10 +106,8 @@ if (list_updated('stock_id')) $Ajax->activate('price_table'); //-------------------------------------------------------------------------------------------------- -$action = $_SERVER['PHP_SELF']; -if (@$_GET['popup']) - $action .= "?stock_id=".get_post('stock_id'); -start_form(false, false, $action); +if (!@$_GET['popup']) + start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); @@ -229,8 +227,9 @@ end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); -end_form(); if (!@$_GET['popup']) +{ + end_form(); end_page(@$_GET['popup'], false, false); - +} ?> diff --git a/inventory/reorder_level.php b/inventory/reorder_level.php index c863796..bd517f2 100644 --- a/inventory/reorder_level.php +++ b/inventory/reorder_level.php @@ -37,11 +37,8 @@ if (list_updated('stock_id')) $Ajax->activate('reorders'); } //------------------------------------------------------------------------------------ - -$action = $_SERVER['PHP_SELF']; -if (@$_GET['popup']) - $action .= "?stock_id=".get_post('stock_id'); -start_form(false, false, $action); +if (!@$_GET['popup']) + start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); @@ -113,8 +110,9 @@ end_table(1); div_end(); submit_center('UpdateData', _("Update"), true, false, 'default'); -end_form(); if (!@$_GET['popup']) +{ + end_form(); end_page(@$_GET['popup'], false, false); - +} ?> -- 2.30.2