From 699e6b4e6e0bf42da9a040dc567fdf670dbead71 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 29 Dec 2009 16:41:16 +0000 Subject: [PATCH] - Fixed bug Trac #60 (Modification of a Service Call does not work with IE). This was due to some forms being contained within another form (forbidden in HTML) SVN:trunk[216] --- application/itopwebpage.class.inc.php | 1 + application/ui.linkswidget.class.inc.php | 15 +++++++++------ application/webpage.class.inc.php | 13 +++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 6f8698deb..dfe51047e 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -332,6 +332,7 @@ EOF { echo "
$s_captured_output
\n"; } + echo $this->s_deferred_content; echo "
Please wait...
\n"; // jqModal Window echo " \n"; echo " \n"; diff --git a/application/ui.linkswidget.class.inc.php b/application/ui.linkswidget.class.inc.php index a51d132b6..8109dc649 100644 --- a/application/ui.linkswidget.class.inc.php +++ b/application/ui.linkswidget.class.inc.php @@ -78,8 +78,8 @@ class UILinksWidget $sHTMLValue .= "\n"; - $sHTMLValue .= $this->GetObjectPickerDialog($oPage, $sTargetClass, 'oLinkWidget'.$this->m_iInputId.'.OnOk'); - $sHTMLValue .= $this->GetLinkObjectDialog($oPage, $this->m_iInputId); + $oPage->add_at_the_end($this->GetObjectPickerDialog($oPage, $sTargetClass, 'oLinkWidget'.$this->m_iInputId.'.OnOk')); // Forms should not be inside forms + $oPage->add_at_the_end($this->GetLinkObjectDialog($oPage, $this->m_iInputId)); // Forms should not be inside forms $sHTMLValue .= "m_iInputId}\" size=\"35\" value=\"\" title=\"Type the first 3 characters\"/>"; $sHTMLValue .= "m_iInputId}\" value=\" Add... \" class=\"action\" onClick=\"oLinkWidget{$this->m_iInputId}.AddObject();\"/>"; $sHTMLValue .= " m_iInputId', '$sExtKeyToRemote');\"/>"; @@ -94,10 +94,13 @@ class UILinksWidget { // Few choices, use a normal 'select' $sHTMLValue = "\n"; } @@ -274,7 +277,7 @@ EOF; $sHTML = "
\n"; $sHTML .= "
\n"; - $sHTML .= "

".MetaModel::GetName($sLinkedClass)." attributes

\n"; + $sHTML .= "

".MetaModel::GetName($sLinkedClass)." attributes

\n"; $sHTML .= "
\n"; $index = 0; $aAttrsMap = array(); diff --git a/application/webpage.class.inc.php b/application/webpage.class.inc.php index e33e7235c..b7cafa940 100644 --- a/application/webpage.class.inc.php +++ b/application/webpage.class.inc.php @@ -14,6 +14,7 @@ class web_page { protected $s_title; protected $s_content; + protected $s_deferred_content; protected $a_scripts; protected $a_styles; protected $a_include_scripts; @@ -25,6 +26,7 @@ class web_page { $this->s_title = $s_title; $this->s_content = ""; + $this->s_deferred_content = ''; $this->a_scripts = array(); $this->a_styles = array(); $this->a_linked_scripts = array(); @@ -59,6 +61,16 @@ class web_page $this->s_content .= $s_html; } + /** + * Add any text or HTML fragment at the end of the body of the page + * This is useful to add hidden content, DIVs or FORMs that should not + * be embedded into each other. + */ + public function add_at_the_end($s_html) + { + $this->s_deferred_content .= $s_html; + } + /** * Add a paragraph to the body of the page */ @@ -281,6 +293,7 @@ class web_page { echo "
$s_captured_output
\n"; } + echo $this->s_deferred_content; echo "\n"; echo "\n"; }