summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdemos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page3
-rwxr-xr-xdemos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php8
-rw-r--r--framework/Web/Javascripts/source/prado/validator/validation3.js2
3 files changed, 11 insertions, 2 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page
index 1d16235e..33811167 100755
--- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page
@@ -12,7 +12,8 @@ Custom validator using callbacks:
ControlToValidate="textbox1"
ErrorMessage="Please enter 'Prado'"
OnServerValidate="validator1_onvalidate" />
-<com:TActiveButton ID="button1" Text="Submit!" />
+<com:TActiveButton ID="button1" Text="Submit!" OnCallback="button1_oncallback"/>
+<com:TActiveLabel ID="label1" />
</td></tr>
</table>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php
index 916432ca..b8d4e28a 100755
--- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.php
@@ -6,5 +6,13 @@ class Home extends TPage
{
$param->IsValid = $this->textbox1->Text == 'Prado';
}
+
+ public function button1_oncallback($sender, $param)
+ {
+ if($this->IsValid)
+ $this->label1->Text='Callback success';
+ else
+ $this->label1->Text='Validation failed';
+ }
}
diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js
index 98be95d7..24466599 100644
--- a/framework/Web/Javascripts/source/prado/validator/validation3.js
+++ b/framework/Web/Javascripts/source/prado/validator/validation3.js
@@ -1603,7 +1603,7 @@ Prado.WebUI.TActiveCustomValidator = jQuery.klass(Prado.WebUI.TBaseValidator,
this.options.OnValidate(this, invoker);
}
- return this.isValid;
+ return true;
},
/**