Closed asanufriev closed 6 years ago
Maybe you shouldn't use buttons group:
//---------------editstage_form.php---------------
// $buttonarray = array(); // $buttonarray[] = $mform->createElement('button', 'scanQR', get_string('scanQR_scanbutton', 'treasurehunt')); // $buttonarray[] = $mform->createElement('button', 'generateQR', get_string('scanQR_generatebutton', 'treasurehunt')); // // $buttonarray[] = &$mform->createElement('submit', 'submitbutton', get_string('savechanges')); // // $buttonarray[] = &$mform->createElement('cancel'); // $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); // $mform->closeHeaderBefore('buttonar'); $mform->addElement('button', 'scanQR', get_string('scanQR_scanbutton', 'treasurehunt')); $mform->addElement('button', 'generateQR', get_string('scanQR_generatebutton', 'treasurehunt')); $mform->disabledIf('generateQR','qrtext','eq',''); //---------------editstage_form.php---------------
Thank you for your advice. You have your fix in09e652121f3439c082c5d6866f7b20b47672b912 Now the buttons are not in the same line but Essential theme renders them.
Maybe you shouldn't use buttons group:
//---------------editstage_form.php---------------
// $buttonarray = array(); // $buttonarray[] = $mform->createElement('button', 'scanQR', get_string('scanQR_scanbutton', 'treasurehunt')); // $buttonarray[] = $mform->createElement('button', 'generateQR', get_string('scanQR_generatebutton', 'treasurehunt')); // // $buttonarray[] = &$mform->createElement('submit', 'submitbutton', get_string('savechanges')); // // $buttonarray[] = &$mform->createElement('cancel'); // $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); // $mform->closeHeaderBefore('buttonar'); $mform->addElement('button', 'scanQR', get_string('scanQR_scanbutton', 'treasurehunt')); $mform->addElement('button', 'generateQR', get_string('scanQR_generatebutton', 'treasurehunt')); $mform->disabledIf('generateQR','qrtext','eq',''); //---------------editstage_form.php---------------