diff options
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page | 26 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php | 16 |
2 files changed, 42 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page index acf49068..5f41d209 100644 --- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page @@ -92,6 +92,32 @@ Dialog with callbacks: </com:TJuiDialog> </td></tr> +<tr><td class="samplenote"> +Collecting user input using a dialog: +</td><td class="sampleaction"> +<com:TActiveButton + Text="Open Dialog" + OnClick="bt5Click"/> +<com:TJuiDialog + ID="dlg5" + Options.Width="400" + Options.Title="Dialog with textbox" + Options.AutoOpen="False" + Options.Position="center center" + > + Write something: <com:TActiveTextBox ID="txtSomething" /> + <com:TJuiDialogButton + Text="Ok" + OnClick="dlg5Ok" + /> + <com:TJuiDialogButton + Text="Cancel" + OnClick="dlg5Cancel" + /> +</com:TJuiDialog> +<com:TActiveLabel ID="lbl5" /> +</td></tr> + </table> </com:TContent> diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php index 3d89011c..86fc8f7b 100644 --- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php @@ -23,6 +23,11 @@ class Home extends TPage $this->dlg4->open(); } + public function bt5Click($sender, $param) + { + $this->dlg5->open(); + } + public function dlg3Ok($sender, $param) { $this->lbl3->Text="Button Ok clicked"; @@ -63,4 +68,15 @@ class Home extends TPage $this->dlg4->getOptions()->position = "$x $y"; } + public function dlg5Ok($sender, $param) + { + $this->lbl5->Text="Button Ok clicked. You wrote: ".$this->txtSomething->Text; + $this->dlg5->close(); + } + + public function dlg5Cancel($sender, $param) + { + $this->lbl5->Text="Button Cancel clicked. You wrote: ".$this->txtSomething->Text; + $this->dlg5->close(); + } }
\ No newline at end of file |