summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/controls/protected/pages/HomePage.tpl4
-rw-r--r--demos/controls/protected/pages/LoginPage.tpl7
-rw-r--r--demos/controls/protected/pages/PlainPage.tpl7
-rw-r--r--demos/controls/protected/pages/master/MasterPage.tpl18
-rw-r--r--demos/controls/protected/pages/private/MemberPage.tpl7
-rw-r--r--framework/Web/THttpRequest.php4
-rw-r--r--framework/Web/UI/TClientScriptManager.php4
-rw-r--r--framework/Web/UI/TForm.php4
8 files changed, 41 insertions, 14 deletions
diff --git a/demos/controls/protected/pages/HomePage.tpl b/demos/controls/protected/pages/HomePage.tpl
index 58f5505b..9cb24d3f 100644
--- a/demos/controls/protected/pages/HomePage.tpl
+++ b/demos/controls/protected/pages/HomePage.tpl
@@ -1,6 +1,7 @@
<%@ MasterClass="Pages.master.MasterPage" %>
-<com:TContent id="header" >
+<com:TContent id="body" >
<com:TForm>
+<div>
<com:THiddenField Value="test" />
<h1>Welcome! <%=$this->User->Name %></h1>
<com:TLiteral Text="<literal>" Encode="true"/>
@@ -13,5 +14,6 @@
<com:THyperLink Text="Visit a 'classless' page" NavigateUrl="?sp=page.plain" /> |
<com:THyperLink Text="Visit member only page" NavigateUrl="?sp=page.private.member" />
<com:TLinkButton Text="Click Me" Click="linkClicked" OnClientClick="javascript:alert('you hit me')"/>
+</div>
</com:TForm>
</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/LoginPage.tpl b/demos/controls/protected/pages/LoginPage.tpl
index 04edae1c..db687e00 100644
--- a/demos/controls/protected/pages/LoginPage.tpl
+++ b/demos/controls/protected/pages/LoginPage.tpl
@@ -1,4 +1,7 @@
+<%@ MasterClass="Pages.master.MasterPage" %>
+<com:TContent id="body" >
<com:TForm>
+<div>
<com:TPanel GroupingText="Login" Width="270px" HorizontalAlign="center">
<com:TLabel Text="Username" AssociatedControlID="username"/>
<com:TTextBox ID="username" /><br/>
@@ -7,4 +10,6 @@
<com:TButton Text="Login" Click="login" />
<com:TLabel ID="error" />
</com:TPanel>
-</com:TForm> \ No newline at end of file
+</div>
+</com:TForm>
+</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/PlainPage.tpl b/demos/controls/protected/pages/PlainPage.tpl
index 7591d700..1238a5fb 100644
--- a/demos/controls/protected/pages/PlainPage.tpl
+++ b/demos/controls/protected/pages/PlainPage.tpl
@@ -1 +1,6 @@
-This is a page without explicitly defined page class. \ No newline at end of file
+<%@ MasterClass="Pages.master.MasterPage" %>
+<com:TContent id="body" >
+<div>
+This is a page without explicitly defined page class.
+</div>
+</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/master/MasterPage.tpl b/demos/controls/protected/pages/master/MasterPage.tpl
index 6bead633..fcca7230 100644
--- a/demos/controls/protected/pages/master/MasterPage.tpl
+++ b/demos/controls/protected/pages/master/MasterPage.tpl
@@ -1,8 +1,18 @@
-<html>
-<head><title>test</title>
-<body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<com:TContentPlaceHolder id="header" />
+<head>
+<title>test</title>
+</head>
+<body>
+<com:TContentPlaceHolder id="body" />
+<p>
+<a href="http://validator.w3.org/check?uri=referer"><img
+src="http://www.w3.org/Icons/valid-xhtml10"
+alt="Valid XHTML 1.0 Strict" height="31" width="88" style="border:0"/></a>
+</p>
</body>
+
</html> \ No newline at end of file
diff --git a/demos/controls/protected/pages/private/MemberPage.tpl b/demos/controls/protected/pages/private/MemberPage.tpl
index a19c934c..6582aec6 100644
--- a/demos/controls/protected/pages/private/MemberPage.tpl
+++ b/demos/controls/protected/pages/private/MemberPage.tpl
@@ -1,8 +1,13 @@
+<%@ MasterClass="Pages.master.MasterPage" %>
+<com:TContent id="body" >
<com:TForm>
+<div>
Congratulations, <com:TLabel Text=<%=$this->User->Name%> />!<br/>
<%=
$this->Application->User->Name;
%>
You have reached this member-only area.
<com:TButton Text="Logout" Click="logout" />
-</com:TForm> \ No newline at end of file
+</div>
+</com:TForm>
+</com:TContent> \ No newline at end of file
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index bd61765c..80e87d15 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -369,10 +369,10 @@ class THttpRequest extends TComponent implements IModule
if(is_array($getItems) || $getItems instanceof Traversable)
{
foreach($getItems as $name=>$value)
- $url.='&'.urlencode($name).'='.urlencode($value);
+ $url.='&amp;'.urlencode($name).'='.urlencode($value);
}
if(defined('SID') && SID != '')
- $url.='&'.SID;
+ $url.='&amp;'.SID;
return $url;
}
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index bb8c44a3..03ac8479 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -97,7 +97,7 @@ class TClientScriptManager extends TComponent
if(!$options || (!$options->getPerformValidation() && !$options->getTrackFocus() && $options->getClientSubmit() && $options->getActionUrl()==''))
{
$this->registerPostBackScript();
- $formID=$this->_page->getForm()->getUniqueID();
+ $formID=$this->_page->getForm()->getClientID();
$postback=self::POSTBACK_FUNC.'(\''.$formID.'\',\''.$control->getUniqueID().'\',\''.THttpUtility::quoteJavaScriptString($parameter).'\')';
if($options && $options->getAutoPostBack())
$postback='setTimeout(\''.THttpUtility::quoteJavaScriptString($postback).'\',0)';
@@ -308,7 +308,7 @@ class TClientScriptManager extends TComponent
$str.="<input type=\"hidden\" name=\"$name\" id=\"$name\" value=\"$value\" />\n";
}
if($str!=='')
- $writer->write($str);
+ $writer->write("<div>\n".$str."</div>\n");
}
public function renderExpandoAttributes($writer)
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php
index 4c619299..72eb2e10 100644
--- a/framework/Web/UI/TForm.php
+++ b/framework/Web/UI/TForm.php
@@ -11,7 +11,7 @@ class TForm extends TControl
protected function addAttributesToRender($writer)
{
$attributes=$this->getAttributes();
- $writer->addAttribute('name',$this->getName());
+// $writer->addAttribute('name',$this->getName());
$writer->addAttribute('method',$this->getMethod());
$writer->addAttribute('action',$this->getApplication()->getRequest()->getRequestURI());
$attributes->remove('name');
@@ -41,7 +41,7 @@ class TForm extends TControl
else
throw new Exception('Only IButtonControl can be default button.');
}
- $writer->addAttribute('id',$this->getUniqueID());
+ $writer->addAttribute('id',$this->getClientID());
foreach($attributes as $name=>$value)
$writer->addAttribute($name,$value);
}