diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/example/example.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/example/example.php b/plugins/example/example.php index eef604b4f..f3788ae8c 100644 --- a/plugins/example/example.php +++ b/plugins/example/example.php @@ -23,7 +23,9 @@ class Example extends Plugin { function save() { $example_value = db_escape_string($_POST["example_value"]); - echo "Value set to $example_value (not really)"; + $this->host->set($this, "example", $example_value); + + echo "Value set to $example_value"; } function get_prefs_js() { @@ -35,6 +37,13 @@ class Example extends Plugin { print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__("Example Pane")."\">"; + print "<br/>"; + +// print_r($this->host->set($this, "example", rand(0,100))); +// print_r($this->host->get_all($this)); + + $value = $this->host->get($this, "example"); + print "<form dojoType=\"dijit.form.Form\">"; print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt\"> @@ -47,7 +56,7 @@ class Example extends Plugin { notify_info(transport.responseText); } }); - this.reset(); + //this.reset(); } </script>"; @@ -58,7 +67,7 @@ class Example extends Plugin { print "<table width=\"100%\" class=\"prefPrefsList\">"; print "<tr><td width=\"40%\">".__("Sample value")."</td>"; - print "<td class=\"prefValue\"><input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\" name=\"example_value\"></td></tr>"; + print "<td class=\"prefValue\"><input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\" name=\"example_value\" value=\"$value\"></td></tr>"; print "</table>"; |