summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected
diff options
context:
space:
mode:
authorwei <>2006-07-02 05:50:29 +0000
committerwei <>2006-07-02 05:50:29 +0000
commit875efd1707a2ac5307b24181ddd7e0420bff5854 (patch)
treea7e3fa5da5aad29cba83f56b47a92d6126ef88f7 /tests/FunctionalTests/tickets/protected
parent4009bc98e96c38d22b3c199f3bfefe4c30783d00 (diff)
fixed 3.02 bug
Diffstat (limited to 'tests/FunctionalTests/tickets/protected')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket205.page24
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket205.php11
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket207.page16
3 files changed, 44 insertions, 7 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page
index 1f271c14..1481a227 100644
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page
@@ -1,4 +1,26 @@
<com:TContent ID="Content">
<h3>TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnError after postback.</h3>
-
+ <style>
+ .required
+ {
+ border: 1px solid red;
+ background-color: pink;
+ }
+ </style>
+ <script type="text/javascript">
+ function clientSideCustomValidate(sender, param)
+ {
+ return param == "Prado";
+ }
+ </script>
+ <com:TTextBox ID="textbox1" />
+ <com:TCustomValidator
+ ID="validator1"
+ ControlToValidate="textbox1"
+ ControlCssClass="required"
+ OnServerValidate="customValidate"
+ ClientValidationFunction="clientSideCustomValidate"
+ ClientSide.OnError="alert('error')"
+ ErrorMessage="must equal to 'Prado'" />
+ <com:TButton ID="button1" Text="Submit!" />
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.php b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php
new file mode 100644
index 00000000..6145af9a
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.php
@@ -0,0 +1,11 @@
+<?php
+
+class Ticket205 extends TPage
+{
+ function customValidate($sender, $param)
+ {
+ $param->IsValid = $this->textbox1->Text == "Prado";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page
index 8826c208..556c5aae 100644
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page
@@ -1,13 +1,17 @@
<com:TContent ID="Content">
<h2>Validators ClientSide.OnError triggered twice</h2>
- <com:TTextBox ID="T" /><br />
- <com:TRequiredFieldValidator ControlToValidate="T" Text="Error"
- ClientSide.OnError="Logger.info('error on T fired')" />
+ <h3>Use ClientSide.ObseveChanges="false"</h3>
+ <com:TTextBox ID="text1" /><br />
+ <com:TRequiredFieldValidator
+ id="validator1"
+ ControlToValidate="text1" Text="Error"
+ ClientSide.ObserveChanges="false"
+ ClientSide.OnError="alert('error on text1 fired')" />
<br />
- <com:TTextBox ID="B" /><br />
- <com:TRequiredFieldValidator ControlToValidate="B" Text="Error" />
+ <com:TTextBox ID="text2" /><br />
+ <com:TRequiredFieldValidator id="validator2" ControlToValidate="text2" Text="Error" />
<br />
- <com:TButton Text="submit" />
+ <com:TButton id="button1" Text="submit" />
<h3>Conditions</h3>
<pre>
(TextBox? B is just there to prevent server submission)