summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.page17
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.php11
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.page17
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.php11
4 files changed, 56 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.page
new file mode 100755
index 00000000..6a0188d6
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.page
@@ -0,0 +1,17 @@
+<com:TContent ID="body">
+<h1>TReCaptcha Samples</h1>
+
+<h2>Validating ReCAPTCHA v1</h2>
+
+Please note that this sample can't work unless you provide a valid private/public key to use the ReCAPTCHA service.
+
+<com:TReCaptcha ID="Captcha"
+ PublicKey="insert your public key here"
+ PrivateKey="insert your private key here"
+/>
+
+<com:TButton Id="SubmitButton" Text="Submit" OnClick="buttonClicked" />
+<com:TReCaptchaValidator ControlToValidate="Captcha"
+ ErrorMessage="You are challenged!" />
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.php
new file mode 100755
index 00000000..d99d2df2
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($this->IsValid)
+ $sender->Text="You passed!";
+ }
+}
+
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.page
new file mode 100755
index 00000000..742fe496
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.page
@@ -0,0 +1,17 @@
+<com:TContent ID="body">
+<h1>TReCaptcha Samples</h1>
+
+<h2>Validating ReCAPTCHA v2</h2>
+
+Please note that this sample can't work unless you provide a valid private/public key to use the ReCAPTCHA service.
+
+<com:TReCaptcha2 ID="Captcha"
+ SiteKey="insert your site key"
+ SecretKey="insert your secret key"
+/>
+
+<com:TActiveButton Id="SubmitButton" Text="Submit" OnCallback="buttonCallback" />
+<com:TReCaptcha2Validator ControlToValidate="Captcha"
+ ErrorMessage="You are challenged!" />
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.php
new file mode 100755
index 00000000..aedbb7dc
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TReCaptcha2/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonCallback($sender,$param)
+ {
+ if($this->IsValid)
+ $sender->Text="You passed!";
+ }
+}
+