-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmpp_domain_registration.js
More file actions
25 lines (25 loc) · 976 Bytes
/
xmpp_domain_registration.js
File metadata and controls
25 lines (25 loc) · 976 Bytes
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
$('document').ready(function(){
$('#auth_method').on('select2-selecting', function(e){
val = e.choice ? e.choice.id : e.target.selectedIndex;
if(val == 2){
//Mailbox
$('#toggle-auth-internal').removeClass('in');
$('#toggle-registration-closed').removeClass('in');
}else if(val != undefined){
$('#toggle-auth-internal').addClass('in');
$('#public_registration').trigger('change');
}else{
$('#toggle-auth-internal').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');
$('#auth_method').trigger('select2-selecting');
})