Просмотр исходного кода

new check_configure_kerio_buisness_mail.tpl

andre 6 месяцев назад
Родитель
Сommit
80f300ef7d
1 измененных файлов с 6 добавлено и 11 удалено
  1. 6 11
      check_configure_kerio_buisness_mail.tpl

+ 6 - 11
check_configure_kerio_buisness_mail.tpl

@@ -24,7 +24,8 @@
     };
     jQuery(document).ready(function(){
         customFields = $("*[id^='customfield']");
-        checkBoxes = $("*[class^='iCheck-helper']");
+        checkBoxHelper = $("*[class^='iCheck-helper']");
+        checkBox = $("*[id°='iCheck-customfield']")
         $("#btnCompleteProductConfig").prop("disabled",true);
         $(customFields[0]).val(''); // domain
         $(checkBoxes[0]).removeClass('checked'); // checkbox
@@ -36,21 +37,15 @@
             $(customFields[0]).removeClass('has-error');
             $(customFields[0]).css('background-color', '');
         });
-        $(checkBoxes[0]).click(function () {
-            checkDomain( $(customFields[0]).val(), {$productinfo['pid']});
-            if ($(customFields[1]).val() == 'on') {
+        $(checkBoxHelper[0]).click(function () {
+            if ($(checkBox[0]).hasClass('checked')) {
                 $("#btnCompleteProductConfig").prop("disabled",false);
-                $(customFields[1]).addClass('has-success');
-                $(customFields[1]).css('background-color', '#0f03');;
-                $("#hint").text('');
             } else {
                 $("#btnCompleteProductConfig").prop("disabled",true);
-                $(customFields[1]).addClass('has-error');
-                $(customFields[1]).css('background-color', '#f003');;
-                $("#hint").text('Akzeptieren Sie die erweiterten Nutzungsbedingungen');
             }
+            checkDomain( $(customFields[0]).val(), {$productinfo['pid']});
         });
-        $(checkBoxes[0]).hover (function () {
+        $(checkBox[0]).hover (function () {
             $("#hint").text('Akzeptieren Sie die erweiterten Nutzungsbedingungen');
         });
     });