Explorar o código

modify orderform for ThurVServer

andre %!s(int64=4) %!d(string=hai) anos
pai
achega
715e0d3561
Modificáronse 1 ficheiros con 17 adicións e 63 borrados
  1. 17 63
      check_configure_thurvserver.tpl

+ 17 - 63
check_configure_thurvserver.tpl

@@ -1,69 +1,23 @@
 <script>
 <script>
-    function checkMailAddress ( mailname, maildomain, pid) {
-        var xhttp = new XMLHttpRequest();
-        var success = false;
-        xhttp.onreadystatechange = function() {
-            if (this.readyState == 4 && this.status == 200) {
-                if( this.responseText.trim() == 'yes') {
-                    console.log(this.responseText);
-                    $(customFields[4]).prop("disabled",false);
-                    $(customFields[5]).prop("disabled",true);
-                    $(customFields[2]).addClass('has-success');
-                    $(customFields[2]).css('background-color', '#0f03');;
-                    $("#hintHead").text('');
-                    $("#hintLength").text('');
-                    $("#hintNumeric").text('');
-                    $("#hintSymbols").text('');
-                    $("#hintUpperLower").text('');
-                } else {
-                    console.log(this.responseText);
-                    $(customFields[4]).prop("disabled",true);
-                    $(customFields[5]).prop("disabled",true);
-                    $(customFields[2]).addClass('has-error');
-                    $(customFields[2]).css('background-color', '#f003');;
-                    $("#hintHead").text('Mailadresse ' + $(customFields[2]).val() + '@' + $(customFields[3]).val() + ' nicht verfügbar!');
-                    $("#hintLength").text('');
-                    $("#hintNumeric").text('');
-                    $("#hintSymbols").text('');
-                    $("#hintUpperLower").text('');
-                }
-            }
-        };
-        xhttp.open("GET", "modules/servers/zimbraSingle/zimbraAddressAvailable.php?name=" + mailname + '&domain=' + maildomain + '&pid=' + pid, true);
-        xhttp.send();
-    };
     jQuery(document).ready(function(){
     jQuery(document).ready(function(){
         customFields = $("*[id^='customfield']");
         customFields = $("*[id^='customfield']");
         $("#btnCompleteProductConfig").prop("disabled",true);
         $("#btnCompleteProductConfig").prop("disabled",true);
+        $(customFields[3]).val('');
         $(customFields[4]).val('');
         $(customFields[4]).val('');
-        $(customFields[5]).val('');
-        if ($(customFields[2]).val().length > 0) {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
-        }
         $(customFields[4]).prop("disabled",true);
         $(customFields[4]).prop("disabled",true);
-        $(customFields[5]).prop("disabled",true);
-        $(customFields[2]).blur(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
-        });
-        $(customFields[2]).keyup(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
-        });
-        $(customFields[3]).change(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
-        });
-        $(customFields[4]).focus (function () {
+        $(customFields[3]).focus (function () {
             $("#hintHead").text('Tipps für ein gutes Passwort');
             $("#hintHead").text('Tipps für ein gutes Passwort');
             $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
             $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
             $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
             $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
             $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % + - etc...)');
             $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % + - etc...)');
             $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
             $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
         });
         });
-        $(customFields[4]).keyup(function () {
+        $(customFields[3]).keyup(function () {
             var pwlengthOK = false;
             var pwlengthOK = false;
             var numericOK = false;
             var numericOK = false;
             var symbolsOK = false;
             var symbolsOK = false;
             var upperOK = false;
             var upperOK = false;
-            var pw = $(customFields[4]).val();
+            var pw = $(customFields[3]).val();
             var pwlength = (pw.length);
             var pwlength = (pw.length);
             if (pwlength > 7) {
             if (pwlength > 7) {
                 pwlengthOK = true;
                 pwlengthOK = true;
@@ -101,29 +55,29 @@
                 upperlowerOK = false;
                 upperlowerOK = false;
                 $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
                 $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
             }
             }
-            $(customFields[4]).removeClass('has-error has-warning has-success');
+            $(customFields[3]).removeClass('has-error has-warning has-success');
             if (pwlengthOK && numericOK && symbolsOK && upperlowerOK) {
             if (pwlengthOK && numericOK && symbolsOK && upperlowerOK) {
-                $(customFields[5]).prop("disabled",false);
-                $(customFields[4]).addClass('has-success');
-                $(customFields[4]).css('background-color', '#0f03');;
+                $(customFields[4]).prop("disabled",false);
+                $(customFields[3]).addClass('has-success');
+                $(customFields[3]).css('background-color', '#0f03');;
                 $("#hintHead").text('');
                 $("#hintHead").text('');
             } else {
             } else {
-                $(customFields[5]).prop("disabled",true);
-                $(customFields[4]).addClass('has-error');
-                $(customFields[4]).css('background-color', '#f003');;
+                $(customFields[4]).prop("disabled",true);
+                $(customFields[3]).addClass('has-error');
+                $(customFields[3]).css('background-color', '#f003');;
                 $("#hintHead").text('Tipps für ein gutes Passwort');
                 $("#hintHead").text('Tipps für ein gutes Passwort');
             }
             }
         });
         });
-        $(customFields[5]).keyup(function () {
-            if ($(customFields[5]).val() == $(customFields[4]).val()) {
+        $(customFields[4]).keyup(function () {
+            if ($(customFields[4]).val() == $(customFields[3]).val()) {
                 $("#btnCompleteProductConfig").prop("disabled",false);
                 $("#btnCompleteProductConfig").prop("disabled",false);
-                $(customFields[5]).addClass('has-success');
-                $(customFields[5]).css('background-color', '#0f03');;
+                $(customFields[4]).addClass('has-success');
+                $(customFields[4]).css('background-color', '#0f03');;
                 $("#hintHead").text('');
                 $("#hintHead").text('');
             } else {
             } else {
                 $("#btnCompleteProductConfig").prop("disabled",true);
                 $("#btnCompleteProductConfig").prop("disabled",true);
-                $(customFields[5]).addClass('has-error');
-                $(customFields[5]).css('background-color', '#f003');;
+                $(customFields[4]).addClass('has-error');
+                $(customFields[4]).css('background-color', '#f003');;
                 $("#hintHead").text('Passworte stimmen nicht überein!');
                 $("#hintHead").text('Passworte stimmen nicht überein!');
             }
             }
         });
         });