#35 Moved 'Add element' submit button
This commit is contained in:
parent
429b8c819c
commit
9c589163a2
1 changed files with 5 additions and 5 deletions
|
@ -231,11 +231,6 @@ class edit_form extends \moodleform {
|
|||
$mform->setDefault('pagerightmargin_' . $page->id, 0);
|
||||
$mform->addHelpButton('pagerightmargin_' . $page->id, 'rightmargin', 'customcert');
|
||||
|
||||
$group = array();
|
||||
$group[] = $mform->createElement('select', 'element_' . $page->id, '', element::get_available_types());
|
||||
$group[] = $mform->createElement('submit', 'addelement_' . $page->id, get_string('addelement', 'customcert'));
|
||||
$mform->addElement('group', 'elementgroup', '', $group, '', false);
|
||||
|
||||
// Check if there are elements to add.
|
||||
if ($elements = $DB->get_records('customcert_elements', array('pageid' => $page->id), 'sequence ASC')) {
|
||||
// Get the total number of elements.
|
||||
|
@ -289,6 +284,11 @@ class edit_form extends \moodleform {
|
|||
$mform->addHelpButton('elements_' . $page->id, 'elements', 'customcert');
|
||||
}
|
||||
|
||||
$group = array();
|
||||
$group[] = $mform->createElement('select', 'element_' . $page->id, '', element::get_available_types());
|
||||
$group[] = $mform->createElement('submit', 'addelement_' . $page->id, get_string('addelement', 'customcert'));
|
||||
$mform->addElement('group', 'elementgroup', '', $group, '', false);
|
||||
|
||||
// Add option to delete this page if there is more than one page.
|
||||
if ($this->numpages > 1) {
|
||||
// Link to delete the element.
|
||||
|
|
Loading…
Reference in a new issue