diff options
author | xue <> | 2006-08-05 21:34:30 +0000 |
---|---|---|
committer | xue <> | 2006-08-05 21:34:30 +0000 |
commit | b7f95ce37ae577e95a81e64aa2aaf3e2e698109d (patch) | |
tree | 85c6b9961ebbd4c9283fbd9b841703f9e4c47307 /tests/FunctionalTests/tickets/protected | |
parent | 550ba06593b467b643862d41a00ca2dd12ee704b (diff) |
merge from 3.0 branch till 1329.
Diffstat (limited to 'tests/FunctionalTests/tickets/protected')
3 files changed, 87 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket274.page b/tests/FunctionalTests/tickets/protected/pages/Ticket274.page new file mode 100644 index 00000000..4e1441ed --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket274.page @@ -0,0 +1,22 @@ +<com:TContent ID="Content">
+
+<com:TDatePicker ID="MyDate"
+ DateFormat="dd/MM/yyyy"
+ Mode="ImageButton" />
+ <com:TRequiredFieldValidator
+ ID="validator1"
+ ControlToValidate="MyDate"
+ EnableClientScript="false"
+ ErrorMessage="date required (dd/MM/yyyy)" />
+
+ <com:TDataTypeValidator
+ ID="validator2"
+ DataType="Date"
+ DateFormat="dd/MM/yyyy"
+ ControlToValidate="MyDate"
+ EnableClientScript="false"
+ ErrorMessage="date must be of the form dd/MM/yyyy" />
+
+ <com:TButton ID="button1" Text="Submit!" />
+
+</com:TContent>
\ No newline at end of file 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 diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket278.php b/tests/FunctionalTests/tickets/protected/pages/Ticket278.php new file mode 100644 index 00000000..1aadee77 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket278.php @@ -0,0 +1,23 @@ +<?php
+
+class Ticket278 extends TPage
+{
+ function validator2_onValidate($sender, $param)
+ {
+ $sender->Enabled = $this->check1->Checked;
+ }
+
+ function validate2_onPostValidate($sender, $param)
+ {
+ $sender->Enabled = true;
+ }
+
+ function onPreRender($param)
+ {
+ parent::onPreRender($param);
+ $this->panel1->Style =
+ $this->check1->Checked ? "display:block" : "display:none";
+ }
+}
+
+?>
\ No newline at end of file |