$mform->setType('rootdir', PARAM_PLUGIN);
$mform->setAdvanced('rootdir');
- $mform->addElement('checkbox', 'acknowledgement', get_string('acknowledgement', 'tool_installaddon'),
- ' '.get_string('acknowledgementtext', 'tool_installaddon'));
- $mform->addRule('acknowledgement', get_string('acknowledgementmust', 'tool_installaddon'), 'required', null, 'client');
-
$this->add_action_buttons(false, get_string('installfromzipsubmit', 'tool_installaddon'));
}
defined('MOODLE_INTERNAL') || die();
$string['acknowledgement'] = 'Acknowledgement';
-$string['acknowledgementmust'] = 'You must acknowledge this';
$string['acknowledgementtext'] = 'I understand that it is my responsibility to have full backups of this site prior to installing additional plugins. I accept and understand that plugins (especially but not only those originating in unofficial sources) may contain security holes, can make the site unavailable, or cause private data leaks or loss.';
$string['featuredisabled'] = 'The plugin installer is disabled on this site.';
$string['installaddon'] = 'Install plugin!';
*/
protected function validation_page_continue() {
+ $output = '';
$conturl = $this->validator->get_continue_url();
+
if (is_null($conturl)) {
$contbutton = '';
+
} else {
$contbutton = $this->output->single_button(
$conturl, get_string('installaddon', 'tool_installaddon'), 'post',
array('class' => 'singlebutton continuebutton'));
+ $output .= $this->output->heading(get_string('acknowledgement', 'tool_installaddon'), 3);
+ $output .= $this->output->container(get_string('acknowledgementtext', 'tool_installaddon'));
}
$cancelbutton = $this->output->single_button(
new moodle_url('/admin/tool/installaddon/index.php'), get_string('cancel', 'core'), 'get',
array('class' => 'singlebutton cancelbutton'));
- return $this->output->container($cancelbutton.$contbutton, 'postvalidationbuttons');
+ $output .= $this->output->container($cancelbutton.$contbutton, 'postvalidationbuttons');
+
+ return $output;
}
}