From 5ca959fa688255a8de61f89fe2751eb4d24a6912 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Tue, 22 Mar 2016 09:22:07 -0400
Subject: [PATCH] fixed typo

---
 interface/web/js/xmpp_domain_registration.js |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/interface/web/js/xmpp_domain_registration.js b/interface/web/js/xmpp_domain_registration.js
index bde0874..1ce239e 100644
--- a/interface/web/js/xmpp_domain_registration.js
+++ b/interface/web/js/xmpp_domain_registration.js
@@ -1,15 +1,19 @@
 $('document').ready(function(){
-    $('#auth_method').on('select2-selecting', function(e){
+    // 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 == 2){
-            //Mailbox
-            $('#toggle-auth-internal').removeClass('in');
-            $('#toggle-registration-closed').removeClass('in');
-        }else if(val != undefined){
-            $('#toggle-auth-internal').addClass('in');
+        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-auth-internal').removeClass('in');
+            $('#toggle-management-normal').removeClass('in');
             $('#toggle-registration-closed').removeClass('in');
         }
     });
@@ -21,5 +25,5 @@
         }
     });
     $('#public_registration').trigger('change');
-    $('#auth_method').trigger('select2-selecting');
+    $('#management_method').trigger('select2-selecting');
 })
\ No newline at end of file

--
Gitblit v1.9.1