summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-07-03 21:53:39 +0200
committerFabio Bas <ctrlaltca@gmail.com>2016-07-03 21:53:39 +0200
commit5eb10dd635c6ea882ba7363f0bec1257ad1caf0c (patch)
tree9519e25c8ef5624c79095032abc50bd7b81d8084 /demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog
parent74ec5b8fef019b4061ebac2ff01cbca5fc158880 (diff)
TJuiDialog: add "collecting user input" example
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.page26
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiDialog/Home.php16
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