summaryrefslogtreecommitdiff
path: root/sqlbox/sqlbox_form.php
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-20 20:27:07 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-20 21:12:39 +0100
commitdb77666426e101c2bb374947af6193570b564e10 (patch)
tree95fd555bbbf2ac78b56534f0928475b8d10d31e0 /sqlbox/sqlbox_form.php
parent13acd7742a9287249c1f0de15435e663f9c8cc28 (diff)
downloadsqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.tar.gz
sqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.tar.bz2
sqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.zip
sqlbox: Add a simple form using formslib
Diffstat (limited to 'sqlbox/sqlbox_form.php')
-rw-r--r--sqlbox/sqlbox_form.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/sqlbox/sqlbox_form.php b/sqlbox/sqlbox_form.php
new file mode 100644
index 0000000..6569595
--- /dev/null
+++ b/sqlbox/sqlbox_form.php
@@ -0,0 +1,18 @@
+<?php
+
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->libdir.'/formslib.php');
+
+class mod_sqlbox_form extends moodleform {
+
+ public function definition() {
+ $mform = $this->_form;
+ $mform->addElement('header', 'general', 'SQLBox');
+ $mform->addElement('text', 'query', 'Query', 'size="50"');
+ $mform->addElement('editor', 'query2', 'Query2');
+ $mform->addElement('submit', 'button', 'Submit');
+ }
+}
+
+?>