From 630371c03ab2f847e3f1e4cc571c31bc80cf6af8 Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Mon, 13 Nov 2006 09:20:42 +0000 Subject: [PATCH] *** empty log message *** --- mod/label/mod.html | 44 ------------------------------------------ mod/label/mod_form.php | 26 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 mod/label/mod.html create mode 100644 mod/label/mod_form.php diff --git a/mod/label/mod.html b/mod/label/mod.html deleted file mode 100644 index e67856f7eb..0000000000 --- a/mod/label/mod.html +++ /dev/null @@ -1,44 +0,0 @@ -content)) { - $form->content = ''; - } -?> - -
-
- - - - - - -

:

- - "; - if ($usehtmleditor) { - helpbutton("richtext", get_string("helprichtext"), "moodle", true, true); - } else { - emoticonhelpbutton("form", "description"); - } - ?> -
-
-
- content); - ?> -
- - - - - - - - - -" /> -
-
diff --git a/mod/label/mod_form.php b/mod/label/mod_form.php new file mode 100644 index 0000000000..ac4c519aff --- /dev/null +++ b/mod/label/mod_form.php @@ -0,0 +1,26 @@ +libdir.'/formslib.php'); +class label_mod_form extends moodleform_mod { + + function definition() { + + $mform =& $this->_form; + $renderer =& $mform->defaultRenderer(); + + $mform->addElement('htmleditor', 'content', get_string('labeltext', 'label')); + $mform->setType('content', PARAM_RAW); + $mform->addRule('content', get_string('required'), 'required', null, 'client'); + + $this->standard_hidden_coursemodule_elements(); + + $mform->addElement('modvisible', 'visible', get_string('visible')); + + $buttonarray=array(); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); + $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); + $renderer->addStopFieldsetElements('buttonar'); + } + +} +?> \ No newline at end of file -- 2.39.5