blob: 1e47e399f429ac11ab3697d6c0d432a4f7bee39b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copy elements value to another element on change
// Used for title choosers
$(document).on('change', '[data-target]', function() {
var target = $(this).data().target;
$(target).val(this.value);
});
STUDIP.domReady(() => {
$('#edit_userdata').on('change', 'input[name^=email]', function() {
var changed = false;
$('#edit_userdata input[name^=email]').each(function() {
changed = changed || this.value !== this.defaultValue;
});
$('#edit_userdata .email-change-confirm').toggle(changed);
});
$('#edit_userdata .email-change-confirm').hide();
});
$(document).on('input', '#new_password', function() {
var message = $(this).data().message;
if (this.validity.patternMismatch) {
this.setCustomValidity(message);
} else {
this.setCustomValidity('');
}
});
|