Moved the add element submit button above the element list
This commit is contained in:
parent
f3dd124473
commit
bb5ce9f4ac
1 changed files with 5 additions and 5 deletions
|
@ -202,6 +202,11 @@ class mod_customcert_edit_form extends moodleform {
|
|||
$mform->addRule('pageheight_' . $page->id, null, 'required', null, 'client');
|
||||
$mform->addHelpButton('pageheight_' . $page->id, 'height', 'customcert');
|
||||
|
||||
$group = array();
|
||||
$group[] = $mform->createElement('select', 'element_' . $page->id, '', customcert_get_elements());
|
||||
$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.
|
||||
|
@ -259,11 +264,6 @@ class mod_customcert_edit_form extends moodleform {
|
|||
$mform->addHelpButton('elements_' . $page->id, 'elements', 'customcert');
|
||||
}
|
||||
|
||||
$group = array();
|
||||
$group[] = $mform->createElement('select', 'element_' . $page->id, '', customcert_get_elements());
|
||||
$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