- 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]
This commit is contained in:
Denis Flaven
2009-12-29 16:41:16 +00:00
parent c9f8417f76
commit 699e6b4e6e
3 changed files with 23 additions and 6 deletions

View File

@@ -332,6 +332,7 @@ EOF
{
echo "<div class=\"raw_output\">$s_captured_output</div>\n";
}
echo $this->s_deferred_content;
echo "<div class=\"jqmWindow\" id=\"ex2\">Please wait...</div>\n"; // jqModal Window
echo "</div> <!-- RightPane -->\n";
echo "</div> <!-- Splitter -->\n";

View File

@@ -78,8 +78,8 @@ class UILinksWidget
$sHTMLValue .= "<script type=\"text/javascript\">\n";
$sHTMLValue .= "oLinkWidget{$this->m_iInputId} = new LinksWidget('{$this->m_iInputId}', '$sLinkedClass', '$sExtKeyToMe', '$sExtKeyToRemote', $sAttributes);\n";
$sHTMLValue .= "</script>\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 .= "<input type=\"text\" id=\"ac_{$this->m_iInputId}\" size=\"35\" value=\"\" title=\"Type the first 3 characters\"/>";
$sHTMLValue .= "<input type=\"button\" id=\"ac_add_{$this->m_iInputId}\" value=\" Add... \" class=\"action\" onClick=\"oLinkWidget{$this->m_iInputId}.AddObject();\"/>";
$sHTMLValue .= "&nbsp;<input type=\"button\" value=\"Browse...\" class=\"action\" onClick=\"return ManageObjects('$sTitle', '$sTargetClass', '$this->m_iInputId', '$sExtKeyToRemote');\"/>";
@@ -94,10 +94,13 @@ class UILinksWidget
{
// Few choices, use a normal 'select'
$sHTMLValue = "<select name=\"attr_{$this->m_sAttCode}\" id=\"{$this->m_iInputId}\">\n";
foreach($aAllowedValues as $key => $value)
$sHTMLValue .= "<option value=\"0\">--- select a value ---</option>\n";
if (count($aAllowedValues) > 0)
{
$sHTMLValue .= "<option value=\"$key\"$sSelected>$value</option>\n";
foreach($aAllowedValues as $key => $value)
{
$sHTMLValue .= "<option value=\"$key\"$sSelected>$value</option>\n";
}
}
$sHTMLValue .= "</select>\n";
}
@@ -274,7 +277,7 @@ EOF;
$sHTML = "<div class=\"jqmWindow\" id=\"LinkDlg_$sId\">\n";
$sHTML .= "<div class=\"wizContainer\">\n";
$sHTML .= "<div class=\"page_header\"><h1 id=\"LinkObject_DlgTitle\">".MetaModel::GetName($sLinkedClass)." attributes</h1></div>\n";
$sHTML .= "<div class=\"page_header\"><h1>".MetaModel::GetName($sLinkedClass)." attributes</h1></div>\n";
$sHTML .= "<form action=\"./UI.php\" onSubmit=\"return oLinkWidget$sId.OnLinkOk();\">\n";
$index = 0;
$aAttrsMap = array();

View File

@@ -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 "<div class=\"raw_output\">$s_captured_output</div>\n";
}
echo $this->s_deferred_content;
echo "</body>\n";
echo "</html>\n";
}