diff options
Diffstat (limited to 'tests/FunctionalTests/tickets/protected')
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page | 41 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.php | 39 |
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 |