From 5eb10dd635c6ea882ba7363f0bec1257ad1caf0c Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 3 Jul 2016 21:53:39 +0200 Subject: TJuiDialog: add "collecting user input" example --- .../pages/JuiControls/Samples/TJuiDialog/Home.page | 26 ++++++++++++++++++++++ .../pages/JuiControls/Samples/TJuiDialog/Home.php | 16 +++++++++++++ 2 files changed, 42 insertions(+) (limited to 'demos/quickstart/protected/pages/JuiControls') 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: + +Collecting user input using a dialog: + + + + Write something: + + + + + + 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 -- cgit v1.2.3