auth config: MDL-19053 Use the HTML editor to edit the login page authentication instructions
They are actually displayed as HTML, but they are edited through a plain text area control instead.
This commit is contained in:
@@ -25,7 +25,7 @@ if ($hassiteconfig
|
||||
get_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php')), ''));
|
||||
$temp->add(new admin_setting_configtext('forgottenpasswordurl', get_string('forgottenpasswordurl', 'auth'),
|
||||
get_string('forgottenpassword', 'auth'), ''));
|
||||
$temp->add(new admin_setting_configtextarea('auth_instructions', get_string('instructions', 'auth'),
|
||||
$temp->add(new admin_setting_confightmltextarea('auth_instructions', get_string('instructions', 'auth'),
|
||||
get_string('authinstructions', 'auth'), ''));
|
||||
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
|
||||
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
|
||||
|
||||
@@ -1916,6 +1916,25 @@ class admin_setting_configtextarea extends admin_setting_configtext {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* General text area with html editor.
|
||||
*/
|
||||
class admin_setting_confightmltextarea extends admin_setting_configtext {
|
||||
|
||||
function admin_setting_confightmltextarea($name, $visiblename, $description, $defaultsetting, $paramtype=PARAM_RAW) {
|
||||
parent::admin_setting_configtext($name, $visiblename, $description, $defaultsetting, $paramtype);
|
||||
}
|
||||
|
||||
function output_html($data, $query='') {
|
||||
global $CFG;
|
||||
|
||||
$CFG->adminusehtmleditor = can_use_html_editor();
|
||||
$return = '<div class="form-htmlarea">'.print_textarea($CFG->adminusehtmleditor, 15, 60, 0, 0, $this->get_full_name(), $data, 0, true).'</div>';
|
||||
|
||||
return format_admin_setting($this, $this->visiblename, $return, $this->description, false, '', NULL, $query);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Password field, allows unmasking of password
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user