summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected
diff options
context:
space:
mode:
authortof <>2008-03-14 11:37:04 +0000
committertof <>2008-03-14 11:37:04 +0000
commitef2989e39255dba36cbbf20a1c5400fe7667ed26 (patch)
tree3d40fc2bb3b9dc24b85ed1df635ecfb3adafb5ab /tests/FunctionalTests/tickets/protected
parente3a43f088e9e7ce3381168d7c8b9ad0592903148 (diff)
New test case for Ticket #671
Diffstat (limited to 'tests/FunctionalTests/tickets/protected')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page41
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.php39
2 files changed, 80 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page b/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page
new file mode 100644
index 00000000..c4e7fb53
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page
@@ -0,0 +1,41 @@
+<com:TContent ID="Content">
+ <div style="margin: 20px auto 0px auto; width: 700px;">
+ <com:TLabel Text="TestField:" ForControl="testField" />
+ <com:TActiveTextBox
+ ID="testField"
+ CssClass="DialogInput"
+ ValidationGroup="group"
+ Style="text-align: left;"
+ AutoPostback="False"
+ />
+ <br />
+ <com:TRequiredFieldValidator
+ ControlToValidate="testField"
+ Display="Dynamic"
+ ControlCssClass="inputerror"
+ ValidationGroup="group"
+ CssClass="error"
+ ErrorMessage="Please insert some Data." />
+ <com:TActiveCustomValidator
+ ControlToValidate="testField"
+ OnServerValidate="Page.check"
+ ValidationGroup="group"
+ Display="Dynamic"
+ ControlCssClass="inputerror"
+ CssClass="error"
+ ErrorMessage="Please insert the right Data."
+ />
+ <br />
+ <com:TLabel Text="TestField2:" ForControl="testField2" />
+ <com:TActiveTextBox
+ ID="testField2"
+ CssClass="DialogInput"
+ ValidationGroup="coran"
+ Style="text-align: left;"
+ />
+ <br />
+ <com:TActiveButton Text="Start" OnCallback="Page.save" ValidationGroup="group" />
+ <com:TActiveLabel id="Result"/>
+ </div>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.php b/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.php
new file mode 100644
index 00000000..ae45bf96
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.php
@@ -0,0 +1,39 @@
+<?php
+
+Prado::Using ('System.Web.UI.ActiveControls.*');
+
+class Ticket671_reopened extends TPage
+{
+
+ public function save( $sender, $param )
+ {
+ $txt="Save callback called ";
+ if ( $this->isValid )
+ $txt .= "DATA OK";
+ else
+ $txt .= "DATA NOK";
+ $this->Result->Text.= ' --- ' . $txt;
+ }
+
+ public function check( $sender, $param )
+ {
+ //$c=$this->CheckCount;
+ $this->Result->Text="Check callback called (".++$this->CheckCount.")";
+ //$this->CheckCount=$c;
+ if ( $this->testField->getText() == 'Test' )
+ $param->isValid = true;
+ else
+ $param->isValid = false;
+ }
+
+ public function setCheckCount($value)
+ {
+ $this->setViewState('CheckCount', $value);
+ }
+
+ public function getCheckCount()
+ {
+ return $this->getViewState('CheckCount', 0);
+ }
+}
+?> \ No newline at end of file