summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket278.page
diff options
context:
space:
mode:
authorwei <>2006-08-05 03:42:04 +0000
committerwei <>2006-08-05 03:42:04 +0000
commitc927f9343001b456c1fa25dc541c3f1b005510f8 (patch)
tree77471b0dbb0327e1c601ec4ffaeb02d9222dc4bd /tests/FunctionalTests/tickets/protected/pages/Ticket278.page
parent58f7aa0ebe9920d33a22b95c3f73fc4b70a75426 (diff)
Fixed #278
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket278.page')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket278.page42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket278.page b/tests/FunctionalTests/tickets/protected/pages/Ticket278.page
new file mode 100644
index 00000000..75aed4d9
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket278.page
@@ -0,0 +1,42 @@
+<com:TContent ID="Content">
+
+ <com:TLabel ForControl="text1" Text="Text 1:" />
+ <com:TTextBox ID="text1" />
+ <com:TRequiredFieldValidator
+ ID="validator1"
+ ControlToValidate="text1"
+ ErrorMessage="Text 1 is required" />
+ <div>
+ <com:TCheckBox ID="check1" Text="More..." />
+ </div>
+
+ <com:TPanel ID="panel1" Style="display:none" >
+ <com:TLabel ForControl="text2" Text="Text 2:" />
+ <com:TTextBox ID="text2" />
+
+ <com:TRequiredFieldValidator
+ ID="validator2"
+ ControlToValidate="text2"
+ OnValidate="validator2_onValidate"
+ OnPreRender="validate2_onPostValidate"
+ ErrorMessage="Text 2 is required">
+ <prop:ClientSide.OnValidate>
+ validator.enabled = $("<%= $this->check1->ClientID %>").checked;
+ </prop:ClientSide.OnValidate>
+ </com:TRequiredFieldValidator>
+
+ </com:TPanel>
+
+ <com:TButton ID="button1" Text="Submit!" />
+
+ <com:TClientScript>
+ Event.OnLoad(function()
+ {
+ Event.observe("<%= $this->check1->ClientID %>", "click", function(ev)
+ {
+ $("<%= $this->panel1->ClientID %>").toggle();
+ });
+ });
+ </com:TClientScript>
+
+</com:TContent> \ No newline at end of file