mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 13:24:56 +01:00
26 lines
905 B
PHP
26 lines
905 B
PHP
<?php // $Id$
|
|
require_once ($CFG->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');
|
|
}
|
|
|
|
}
|
|
?>
|