From 4507cd0059703d39f3e31230c9abe7494334ef4f Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 4 Apr 2015 10:42:22 +0200 Subject: [PATCH] Fixed hidden fields support for ajax driven divs. --- includes/ui/ui_controls.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index c6a0dd4d..515cf999 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -56,7 +56,8 @@ function output_hidden() { global $hidden_fields; - echo implode('', $hidden_fields); + if (is_array($hidden_fields)) + echo implode('', $hidden_fields); $hidden_fields = array(); } //--------------------------------------------------------------------------------- @@ -123,6 +124,7 @@ function table_section($number=1, $width=false) if ($number > 1) { echo "\n"; + output_hidden(); $width = ($width ? "width='$width'" : ""); //echo "\n"; // outer table echo "\n"; // outer table @@ -133,7 +135,10 @@ function table_section($number=1, $width=false) function end_outer_table($breaks=0, $close_table=true) { if ($close_table) + { echo "\n"; + output_hidden(); + } echo "\n"; end_table($breaks); } @@ -388,13 +393,14 @@ function div_end() { global $ajax_divs, $Ajax; + output_hidden(); if (count($ajax_divs)) { $div = array_pop($ajax_divs); if ($div[1] !== null) $Ajax->addUpdate($div[1], $div[0], ob_get_flush()); - echo ""; } + echo ""; } //----------------------------------------------------------------------------- @@ -442,6 +448,7 @@ function tabbed_content_start($name, $tabs, $dft='') { } function tabbed_content_end() { + output_hidden(); echo ""; // content box (don't change to div_end() unless div_start() is used above) div_end(); // tabs widget } -- 2.30.2