summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page38
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php11
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page2
3 files changed, 50 insertions, 1 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
new file mode 100644
index 00000000..375ede75
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
@@ -0,0 +1,38 @@
+<com:TForm ID="form1">
+<style>
+ .loader
+ {
+ position:absolute;
+ right:0px;
+ top:0px;
+ color:white;
+ background-color:#900;
+ padding: 0.5em 1em;
+ }
+ input.required
+ {
+ border: 1px solid red;
+ background-color: pink;
+ }
+</style>
+ <h1>Callback Custom Validator Test</h1>
+
+ <com:TTextBox ID="text1" />
+
+ <com:TActiveCustomValidator
+ ControlToValidate="text1"
+ ErrorMessage="*"
+ ControlCssClass="required"
+ OnServerValidate="validate_text1">
+ <prop:ActiveControl.ClientSide
+ OnLoading="Element.show('loader')"
+ OnComplete="Element.hide('loader')" />
+ </com:TActiveCustomValidator>
+
+ <com:TButton Text="Submit" />
+
+ <span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
+
+ <com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php
new file mode 100644
index 00000000..bf8d730b
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php
@@ -0,0 +1,11 @@
+<?php
+
+class CallbackCustomValidatorTest extends TPage
+{
+ function validate_text1($sender, $param)
+ {
+ $param->IsValid = $param->Value == 'Prado';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
index b6b2d040..7010ca0f 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
@@ -53,7 +53,7 @@
ControlCssClass="required"
ErrorMessage="*" />
- <span id="loader" style="display:none;" class="loader">Loading...</span>
+ <span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
<a href="#" id="link1">Edit</a>