blob: e475bd52fbce4e9d42a835469e887ac0d58fac36 (
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
28
|
elgg.provide('elgg.uservalidationbyemail');
elgg.uservalidationbyemail.init = function() {
$('.unvalidated-users-checkall').click(function() {
checked = $(this).attr('checked');
$('form[name=unvalidated-users]').find('input[type=checkbox]').attr('checked', checked);
});
$('.unvalidated-users-bulk-post').click(function(event) {
$form = $('form[name=unvalidated-users]');
event.preventDefault();
// check there are selected users
if ($form.find('input[type=checkbox]:checked').length < 1) {
return false;
}
// confirmation
if (!confirm($(this).attr('title'))) {
return false;
}
$form.attr('action', $(this).attr('href')).submit();
});
}
elgg.register_hook_handler('init', 'system', elgg.uservalidationbyemail.init);
|