Bläddra i källkod

new check_configure_kerio_buisness_mail.tpl

andre 6 månader sedan
förälder
incheckning
b65eec1f17
2 ändrade filer med 28 tillägg och 97 borttagningar
  1. 21 97
      check_configure_kerio_buisness_mail.tpl
  2. 7 0
      configure_groupware.tpl

+ 21 - 97
check_configure_kerio_buisness_mail.tpl

@@ -1,131 +1,55 @@
 <script>
 <script>
-    function checkMailAddress ( mailname, maildomain, pid) {
+    function checkDomain (domain, pid) {
         var xhttp = new XMLHttpRequest();
         var xhttp = new XMLHttpRequest();
         var success = false;
         var success = false;
         xhttp.onreadystatechange = function() {
         xhttp.onreadystatechange = function() {
             if (this.readyState == 4 && this.status == 200) {
             if (this.readyState == 4 && this.status == 200) {
                 if( this.responseText.trim() == 'yes') {
                 if( this.responseText.trim() == 'yes') {
                     console.log(this.responseText);
                     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('');
+                    $(customFields[0]).addClass('has-success');
+                    $(customFields[0]).css('background-color', '#0f03');;
+                    $("#hint").text('');
                 } else {
                 } else {
                     console.log(this.responseText);
                     console.log(this.responseText);
-                    $(customFields[4]).prop("disabled",true);
-                    $(customFields[5]).prop("disabled",true);
                     $(customFields[2]).addClass('has-error');
                     $(customFields[2]).addClass('has-error');
                     $(customFields[2]).css('background-color', '#f003');;
                     $(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('');
+                    $("#hint").text('Domain' + $(customFields[0]).val() + ' nicht verfügbar!');
                 }
                 }
             }
             }
         };
         };
-        xhttp.open("GET", "modules/servers/kerioSingle/kerioAddressAvailable.php?name=" + mailname + '&domain=' + maildomain + '&pid=' + pid, true);
+        xhttp.open("GET", "modules/servers/kerioEmail/kerioDomainAvailable.php?domain=" + domain + '&pid=' + pid, true);
         xhttp.send();
         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[4]).val('');
-        $(customFields[5]).val('');
-        if ($(customFields[2]).val().length > 0) {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
+        $(customFields[0]).val(''); // domain
+        $(customFields[1]).val(''); // checkbox
+        if ($(customFields[0]).val().length > 3) {
+            checkDomain( $(customFields[0]).val(), {$productinfo['pid']});
         }
         }
-        $(customFields[4]).prop("disabled",true);
-        $(customFields[5]).prop("disabled",true);
-        $(customFields[2]).blur(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
+        $(customFields[0]).blur(function () {
+            checkDomain( $(customFields[0]).val(), {$productinfo['pid']});
         });
         });
-        $(customFields[2]).keyup(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
+        $(customFields[0]).keyup(function () {
+            checkMailAddress( $(customFields[0]).val(), {$productinfo['pid']});
         });
         });
-        $(customFields[3]).change(function () {
+        $(customFields[1]).change(function () {
             checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
             checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
-        });
-        $(customFields[4]).focus (function () {
-            $("#hintHead").text('Tipps für ein gutes Passwort');
-            $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
-            $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
-            $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % + - etc...)');
-            $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
-        });
-        $(customFields[4]).keyup(function () {
-            var pwlengthOK = false;
-            var numericOK = false;
-            var symbolsOK = false;
-            var upperOK = false;
-            var pw = $(customFields[4]).val();
-            var pwlength = (pw.length);
-            if (pwlength > 7) {
-                pwlengthOK = true;
-                $("#hintLength").text('');
-            } else {
-                pwlengthOK = false;
-                $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
-            }
-            var numeric = pw.replace(/[0-9]/g, "");
-            var numnumeric = (pw.length - numeric.length);
-            if (numnumeric > 0) {
-                numericOK = true;
-                $("#hintNumeric").text('');
-            } else {
-                numericOK = false;
-                $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
-            }
-            var symbols = pw.replace(/\W/g, "");
-            var numsymbols = (pw.length - symbols.length);
-            if (numsymbols > 0) {
-                symbolsOK = true;
-                $("#hintSymbols").text('');
-            } else {
-                symbolsOK = false;
-                $("#hintSymbols").text('Benutzen Sie auch mindestens ein Symbol oder Sonderzeichen (# $ ! % & + - etc...)');
-            }
-            var upper = pw.replace(/[A-Z]/g, "");
-            var numupper = (pw.length - upper.length);
-            var lower = pw.replace(/[a-z]/g, "");
-            var numlower = (pw.length - lower.length);
-            if ((numupper > 0) && (numlower > 0)) {
-                upperlowerOK = true;
-                $("#hintUpperLower").text('');
-            } else {
-                upperlowerOK = false;
-                $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
-            }
-            $(customFields[4]).removeClass('has-error has-warning has-success');
-            if (pwlengthOK && numericOK && symbolsOK && upperlowerOK) {
-                $(customFields[5]).prop("disabled",false);
-                $(customFields[4]).addClass('has-success');
-                $(customFields[4]).css('background-color', '#0f03');;
-                $("#hintHead").text('');
-            } else {
-                $(customFields[5]).prop("disabled",true);
-                $(customFields[4]).addClass('has-error');
-                $(customFields[4]).css('background-color', '#f003');;
-                $("#hintHead").text('Tipps für ein gutes Passwort');
-            }
-        });
-        $(customFields[5]).keyup(function () {
-            if ($(customFields[5]).val() == $(customFields[4]).val()) {
+            if ($(customFields[1]).val() == 'on') {
                 $("#btnCompleteProductConfig").prop("disabled",false);
                 $("#btnCompleteProductConfig").prop("disabled",false);
                 $(customFields[5]).addClass('has-success');
                 $(customFields[5]).addClass('has-success');
                 $(customFields[5]).css('background-color', '#0f03');;
                 $(customFields[5]).css('background-color', '#0f03');;
-                $("#hintHead").text('');
+                $("#hint").text('');
             } else {
             } else {
                 $("#btnCompleteProductConfig").prop("disabled",true);
                 $("#btnCompleteProductConfig").prop("disabled",true);
                 $(customFields[5]).addClass('has-error');
                 $(customFields[5]).addClass('has-error');
                 $(customFields[5]).css('background-color', '#f003');;
                 $(customFields[5]).css('background-color', '#f003');;
-                $("#hintHead").text('Passworte stimmen nicht überein!');
+                $("#hint").text('Akzeptieren Sie die erweiterten Nutzungsbedingungen');
             }
             }
         });
         });
+        $(customFields[1]).focus (function () {
+            $("#hint").text('Akzeptieren Sie die erweiterten Nutzungsbedingungen');
+        });
     });
     });
 </script>
 </script>

+ 7 - 0
configure_groupware.tpl

@@ -374,6 +374,10 @@
                                 {/foreach}
                                 {/foreach}
                             </div>
                             </div>
                         {/if}
                         {/if}
+                        <div class="alert alert-info">
+                            <div id="hint">
+                            </div>
+                        </div>
                         <div class="alert alert-warning text-center">
                         <div class="alert alert-warning text-center">
                             <i class="fas fa-question-circle"></i>
                             <i class="fas fa-question-circle"></i>
                             {$LANG.orderForm.haveQuestionsContact} <a href="contact.php" target="_blank" class="alert-link">{$LANG.orderForm.haveQuestionsClickHere}</a>
                             {$LANG.orderForm.haveQuestionsContact} <a href="contact.php" target="_blank" class="alert-link">{$LANG.orderForm.haveQuestionsClickHere}</a>
@@ -388,6 +392,9 @@
 {if file_exists("templates/orderforms/{$carttpl}/layouts/foot.tpl")}
 {if file_exists("templates/orderforms/{$carttpl}/layouts/foot.tpl")}
 	{include file="templates/orderforms/{$carttpl}/layouts/foot.tpl"}
 	{include file="templates/orderforms/{$carttpl}/layouts/foot.tpl"}
 {/if}
 {/if}
+{if file_exists("templates/orderforms/{$carttpl}/check_configure_kerio_buisness_mail.tpl")}
+	{include file="templates/orderforms/{$carttpl}/check_configure_kerio_buisness_mail.tpl"}
+{/if}
 <script language="javascript">
 <script language="javascript">
 	recalctotals();
 	recalctotals();
 </script>
 </script>