Permalink
Browse files

MDL-35615 Course section: fixed alignment for userdefaultname checkbo…

…x to be inline with section name text input
  • Loading branch information...
1 parent 215c189 commit 31946300e9f96109cdf3a354d05f8021356c1fe1 @kordan kordan committed with rwijaya Mar 5, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 course/editsection_form.php
@@ -12,10 +12,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 3194630

Please sign in to comment.