aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cg2/sample/sample.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cg2/sample/sample.inc')
-rw-r--r--packages/cg2/sample/sample.inc15
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/cg2/sample/sample.inc b/packages/cg2/sample/sample.inc
index 9f53c8de..62ec59ab 100644
--- a/packages/cg2/sample/sample.inc
+++ b/packages/cg2/sample/sample.inc
@@ -1,11 +1,11 @@
<?php
-var_dump('BEING INCLUDED');
+//var_dump('BEING INCLUDED');
function sample_on_load_event(&$widgets)
{
/* Called when the form is just loaded. You receive the array widgets as
* argument, and can modify it to alter the behavior of the form. */
- var_dump('BEING LOADED');
+ //var_dump('BEING LOADED');
//$widget =& $widgets[2];
$widget =& get_widget($widgets, 'mytextarea');
$widget->value='This example shows how to change the text inside a text box from within the include file, when the form is loaded.';
@@ -16,7 +16,14 @@ function sample_on_sync_event()
/* This is called when the form is posted. You generally want to sync the
* configurations in the XML file to settings in files spread across the file
* system or maybe restart a service here. */
- var_dump('BEING SYNCED');
+ //var_dump('BEING SYNCED');
+}
+
+function sample_on_apply_event()
+{
+ /* This is called when a configuration has been changed and the user is
+ * prompted to apply the changes and clicks "Apply changes". */
+ var_dump('BEING APPLIED');
}
function sample_on_submit_event()
@@ -25,6 +32,6 @@ function sample_on_submit_event()
* clicked. This should only be used when you have more than one submit
* button in the same form. Otherwise, <on_load_event> performs better and
* is cleaner. */
- var_dump('BEING SUBMITTED');
+ //var_dump('BEING SUBMITTED');
}
?>