mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-61261 badges: Add email validation during backpack configuration
This commit is contained in:
parent
a409707794
commit
8d7c385203
@ -61,10 +61,10 @@ class edit_backpack_form extends moodleform {
|
||||
array('class' => 'notconnected', 'id' => 'connection-status'));
|
||||
$mform->addElement('static', 'status', get_string('status'), $status);
|
||||
$mform->addElement('hidden', 'email', $this->_customdata['email']);
|
||||
$mform->setType('email', PARAM_RAW_TRIMMED);
|
||||
$mform->setType('email', PARAM_EMAIL);
|
||||
$mform->hardFreeze(['email']);
|
||||
$status = html_writer::tag('span', $this->_customdata['email'], []);
|
||||
$mform->addElement('static', 'emailverify', get_string('email'), $status);
|
||||
$emailverify = html_writer::tag('span', s($this->_customdata['email']), []);
|
||||
$mform->addElement('static', 'emailverify', get_string('email'), $emailverify);
|
||||
$buttonarray = [];
|
||||
$buttonarray[] = &$mform->createElement('submit', 'submitbutton',
|
||||
get_string('backpackconnectionresendemail', 'badges'));
|
||||
@ -80,7 +80,7 @@ class edit_backpack_form extends moodleform {
|
||||
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
|
||||
$mform->addHelpButton('email', 'backpackemail', 'badges');
|
||||
$mform->addRule('email', get_string('required'), 'required', null, 'client');
|
||||
$mform->setType('email', PARAM_RAW_TRIMMED);
|
||||
$mform->setType('email', PARAM_EMAIL);
|
||||
$this->add_action_buttons(false, get_string('backpackconnectionconnect', 'badges'));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user