summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/protected
diff options
context:
space:
mode:
authorxue <>2006-04-16 18:02:31 +0000
committerxue <>2006-04-16 18:02:31 +0000
commit9db90898be134c9f70c0b334ec071223e60ed76c (patch)
treec499036f6ca4b350b3f4ae48b0d55cf8308b385d /tests/FunctionalTests/validators/protected
parentfc38326ea80e73717fb1d187a16421f7bc1b1b04 (diff)
Merge from 3.0 branch till 924
Diffstat (limited to 'tests/FunctionalTests/validators/protected')
-rw-r--r--tests/FunctionalTests/validators/protected/pages/Button.page37
-rw-r--r--tests/FunctionalTests/validators/protected/pages/Button.php27
-rw-r--r--tests/FunctionalTests/validators/protected/pages/CheckBox.page40
-rw-r--r--tests/FunctionalTests/validators/protected/pages/CheckBox.php27
-rw-r--r--tests/FunctionalTests/validators/protected/pages/ImageButton.page37
-rw-r--r--tests/FunctionalTests/validators/protected/pages/ImageButton.php27
-rw-r--r--tests/FunctionalTests/validators/protected/pages/Layout.php7
-rw-r--r--tests/FunctionalTests/validators/protected/pages/Layout.tpl34
-rw-r--r--tests/FunctionalTests/validators/protected/pages/LinkButton.page37
-rw-r--r--tests/FunctionalTests/validators/protected/pages/LinkButton.php27
-rw-r--r--tests/FunctionalTests/validators/protected/pages/config.xml5
11 files changed, 305 insertions, 0 deletions
diff --git a/tests/FunctionalTests/validators/protected/pages/Button.page b/tests/FunctionalTests/validators/protected/pages/Button.page
new file mode 100644
index 00000000..5acc596b
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/Button.page
@@ -0,0 +1,37 @@
+<com:TContent ID="Content">
+<h1>Validations Triggered by TButton</h1>
+
+<com:TTextBox ID="TextBox1" />
+<com:TRequiredFieldValidator
+ Text="Textbox1 required"
+ ControlToValidate="TextBox1"
+ ValidationGroup="Group1" />
+<com:TButton Text="Submit1"
+ ValidationGroup="Group1"
+ OnClick="button1Clicked" />
+<com:TLabel ID="Result1" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox2" />
+<com:TRequiredFieldValidator
+ Text="Textbox2 required"
+ ControlToValidate="TextBox2" />
+<com:TButton Text="Submit2"
+ OnClick="button2Clicked" />
+<com:TLabel ID="Result2" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox3" />
+<com:TRequiredFieldValidator
+ Text="Textbox3 required"
+ EnableClientScript="false"
+ ControlToValidate="TextBox3"
+ ValidationGroup="Group3" />
+<com:TButton Text="Submit3"
+ ValidationGroup="Group3"
+ OnClick="button3Clicked" />
+<com:TLabel ID="Result3" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/Button.php b/tests/FunctionalTests/validators/protected/pages/Button.php
new file mode 100644
index 00000000..3dbbc7d6
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/Button.php
@@ -0,0 +1,27 @@
+<?php
+
+class Button extends TPage
+{
+ public function button1Clicked($sender,$param)
+ {
+ $this->Result1->Text="Button1 is clicked";
+ if($this->IsValid)
+ $this->Result1->Text.=' and valid';
+ }
+
+ public function button2Clicked($sender,$param)
+ {
+ $this->Result2->Text="Button2 is clicked";
+ if($this->IsValid)
+ $this->Result2->Text.=' and valid';
+ }
+
+ public function button3Clicked($sender,$param)
+ {
+ $this->Result3->Text="Button3 is clicked";
+ if($this->IsValid)
+ $this->Result3->Text.=' and valid';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/CheckBox.page b/tests/FunctionalTests/validators/protected/pages/CheckBox.page
new file mode 100644
index 00000000..e5cb39ff
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/CheckBox.page
@@ -0,0 +1,40 @@
+<com:TContent ID="Content">
+<h1>Validations Triggered by TCheckBox</h1>
+
+<com:TTextBox ID="TextBox1" />
+<com:TRequiredFieldValidator
+ Text="Textbox1 required"
+ ControlToValidate="TextBox1"
+ ValidationGroup="Group1" />
+<com:TCheckBox Text="Submit1"
+ AutoPostBack="true"
+ ValidationGroup="Group1"
+ OnCheckedChanged="button1Clicked" />
+<com:TLabel ID="Result1" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox2" />
+<com:TRequiredFieldValidator
+ Text="Textbox2 required"
+ ControlToValidate="TextBox2" />
+<com:TCheckBox Text="Submit2"
+ AutoPostBack="true"
+ OnCheckedChanged="button2Clicked" />
+<com:TLabel ID="Result2" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox3" />
+<com:TRequiredFieldValidator
+ Text="Textbox3 required"
+ EnableClientScript="false"
+ ControlToValidate="TextBox3"
+ ValidationGroup="Group3" />
+<com:TCheckBox Text="Submit3"
+ AutoPostBack="true"
+ ValidationGroup="Group3"
+ OnCheckedChanged="button3Clicked" />
+<com:TLabel ID="Result3" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/CheckBox.php b/tests/FunctionalTests/validators/protected/pages/CheckBox.php
new file mode 100644
index 00000000..700ac171
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/CheckBox.php
@@ -0,0 +1,27 @@
+<?php
+
+class CheckBox extends TPage
+{
+ public function button1Clicked($sender,$param)
+ {
+ $this->Result1->Text="Button1 is clicked";
+ if($this->IsValid)
+ $this->Result1->Text.=' and valid';
+ }
+
+ public function button2Clicked($sender,$param)
+ {
+ $this->Result2->Text="Button2 is clicked";
+ if($this->IsValid)
+ $this->Result2->Text.=' and valid';
+ }
+
+ public function button3Clicked($sender,$param)
+ {
+ $this->Result3->Text="Button3 is clicked";
+ if($this->IsValid)
+ $this->Result3->Text.=' and valid';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/ImageButton.page b/tests/FunctionalTests/validators/protected/pages/ImageButton.page
new file mode 100644
index 00000000..d1fae361
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/ImageButton.page
@@ -0,0 +1,37 @@
+<com:TContent ID="Content">
+<h1>Validations Triggered by TImageButton</h1>
+
+<com:TTextBox ID="TextBox1" />
+<com:TRequiredFieldValidator
+ Text="Textbox1 required"
+ ControlToValidate="TextBox1"
+ ValidationGroup="Group1" />
+<com:TImageButton ImageUrl="http://www.pradosoft.com/images/powered.gif"
+ ValidationGroup="Group1"
+ OnClick="button1Clicked" />
+<com:TLabel ID="Result1" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox2" />
+<com:TRequiredFieldValidator
+ Text="Textbox2 required"
+ ControlToValidate="TextBox2" />
+<com:TImageButton ImageUrl="http://www.pradosoft.com/images/powered.gif"
+ OnClick="button2Clicked" />
+<com:TLabel ID="Result2" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox3" />
+<com:TRequiredFieldValidator
+ Text="Textbox3 required"
+ EnableClientScript="false"
+ ControlToValidate="TextBox3"
+ ValidationGroup="Group3" />
+<com:TImageButton ImageUrl="http://www.pradosoft.com/images/powered.gif"
+ ValidationGroup="Group3"
+ OnClick="button3Clicked" />
+<com:TLabel ID="Result3" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/ImageButton.php b/tests/FunctionalTests/validators/protected/pages/ImageButton.php
new file mode 100644
index 00000000..ecedd5bf
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/ImageButton.php
@@ -0,0 +1,27 @@
+<?php
+
+class ImageButton extends TPage
+{
+ public function button1Clicked($sender,$param)
+ {
+ $this->Result1->Text="Button1 is clicked";
+ if($this->IsValid)
+ $this->Result1->Text.=' and valid';
+ }
+
+ public function button2Clicked($sender,$param)
+ {
+ $this->Result2->Text="Button2 is clicked";
+ if($this->IsValid)
+ $this->Result2->Text.=' and valid';
+ }
+
+ public function button3Clicked($sender,$param)
+ {
+ $this->Result3->Text="Button3 is clicked";
+ if($this->IsValid)
+ $this->Result3->Text.=' and valid';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/Layout.php b/tests/FunctionalTests/validators/protected/pages/Layout.php
new file mode 100644
index 00000000..ba96038b
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/Layout.php
@@ -0,0 +1,7 @@
+<?php
+
+class Layout extends TTemplateControl
+{
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/Layout.tpl b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
new file mode 100644
index 00000000..224481e1
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<com:THead Title="PRADO Functional Tests">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ .defect
+ {
+ color: #c00;
+ font-size: 1.15em;
+ }
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+<com:TForm>
+<com:TContentPlaceHolder ID="Content" />
+<hr style="margin-top: 2em" />
+<com:TJavascriptLogger />
+</com:TForm>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/LinkButton.page b/tests/FunctionalTests/validators/protected/pages/LinkButton.page
new file mode 100644
index 00000000..8ed1c338
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/LinkButton.page
@@ -0,0 +1,37 @@
+<com:TContent ID="Content">
+<h1>Validations Triggered by TLinkButton</h1>
+
+<com:TTextBox ID="TextBox1" />
+<com:TRequiredFieldValidator
+ Text="Textbox1 required"
+ ControlToValidate="TextBox1"
+ ValidationGroup="Group1" />
+<com:TLinkButton Text="Submit1"
+ ValidationGroup="Group1"
+ OnClick="button1Clicked" />
+<com:TLabel ID="Result1" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox2" />
+<com:TRequiredFieldValidator
+ Text="Textbox2 required"
+ ControlToValidate="TextBox2" />
+<com:TLinkButton Text="Submit2"
+ OnClick="button2Clicked" />
+<com:TLabel ID="Result2" />
+
+<hr/>
+
+<com:TTextBox ID="TextBox3" />
+<com:TRequiredFieldValidator
+ Text="Textbox3 required"
+ EnableClientScript="false"
+ ControlToValidate="TextBox3"
+ ValidationGroup="Group3" />
+<com:TLinkButton Text="Submit3"
+ ValidationGroup="Group3"
+ OnClick="button3Clicked" />
+<com:TLabel ID="Result3" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/LinkButton.php b/tests/FunctionalTests/validators/protected/pages/LinkButton.php
new file mode 100644
index 00000000..5130dd01
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/LinkButton.php
@@ -0,0 +1,27 @@
+<?php
+
+class LinkButton extends TPage
+{
+ public function button1Clicked($sender,$param)
+ {
+ $this->Result1->Text="Button1 is clicked";
+ if($this->IsValid)
+ $this->Result1->Text.=' and valid';
+ }
+
+ public function button2Clicked($sender,$param)
+ {
+ $this->Result2->Text="Button2 is clicked";
+ if($this->IsValid)
+ $this->Result2->Text.=' and valid';
+ }
+
+ public function button3Clicked($sender,$param)
+ {
+ $this->Result3->Text="Button3 is clicked";
+ if($this->IsValid)
+ $this->Result3->Text.=' and valid';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/config.xml b/tests/FunctionalTests/validators/protected/pages/config.xml
new file mode 100644
index 00000000..83bb5791
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/config.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <pages MasterClass="Application.pages.Layout" />
+</configuration> \ No newline at end of file