Permalink
Browse files

Merge branch 'MDL-35615' of git://github.com/rwijaya/moodle

  • Loading branch information...
2 parents f196cfe + a5b884f commit ca5cb4ccac99470cc9152ee7194bcf10e6c30c07 @nebgor nebgor committed Mar 12, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 course/editsection_form.php
View
9 course/editsection_form.php
@@ -20,10 +20,13 @@ function definition() {
$mform = $this->_form;
$course = $this->_customdata['course'];
- $mform->addElement('checkbox', 'usedefaultname', get_string('sectionusedefaultname'));
- $mform->setDefault('usedefaultname', true);
- $mform->addElement('text', 'name', get_string('sectionname'), array('size'=>'30'));
+ $elementgroup = array();
+ $elementgroup[] = $mform->createElement('text', 'name', '', array('size' => '30'));
+ $elementgroup[] = $mform->createElement('checkbox', 'usedefaultname', '', get_string('sectionusedefaultname'));
+ $mform->addGroup($elementgroup, 'name_group', get_string('sectionname'), ' ', false);
+
+ $mform->setDefault('usedefaultname', true);
$mform->setType('name', PARAM_TEXT);
$mform->disabledIf('name','usedefaultname','checked');

0 comments on commit ca5cb4c

Please sign in to comment.