-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmpp_domain_registration.js
More file actions
29 lines (29 loc) · 1.13 KB
/
xmpp_domain_registration.js
File metadata and controls
29 lines (29 loc) · 1.13 KB
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
29
$('document').ready(function(){
// Not needed as long as maildomain hook is not implemented
return;
$('#management_method').on('select2-selecting', function(e){
val = e.choice ? e.choice.id : e.target.selectedIndex;
if(val == 0){
//normal
$('#toggle-management-normal').addClass('in');
$('#toggle-registration-closed').addClass('in');
$('#public_registration').trigger('change');
}else if(val != undefined){
//maildomain
$('#toggle-management-normal').removeClass('in');
$('#toggle-registration-closed').removeClass('in');
}else{
$('#toggle-management-normal').removeClass('in');
$('#toggle-registration-closed').removeClass('in');
}
});
$('#public_registration').on('change', function(e){
if($(this).is(':checked')){
$('#toggle-registration-closed').removeClass('in');
}else{
$('#toggle-registration-closed').addClass('in');
}
});
$('#public_registration').trigger('change');
$('#management_method').trigger('select2-selecting');
})