Explorar o código

modify password field

andre %!s(int64=4) %!d(string=hai) anos
pai
achega
8aebcd3722
Modificáronse 2 ficheiros con 11 adicións e 1 borrados
  1. 10 0
      check_configure_thurvserver.tpl
  2. 1 1
      configure_thurvserver.tpl

+ 10 - 0
check_configure_thurvserver.tpl

@@ -82,4 +82,14 @@
             }
         });
     });
+    function togglePW(element) {
+        if (element.previousElementSibling.type == 'password') {
+            element.previousElementSibling.type = 'text';
+            element.textContent = '👁 Passwort verstecken';
+        }
+        if (element.previousElementSibling.type == 'test') {
+            element.previousElementSibling.type = 'password';
+            element.textContent = '👁 Passwort anzeigen';
+        }
+    }
 </script>

+ 1 - 1
configure_thurvserver.tpl

@@ -320,7 +320,7 @@ var _localLang = {
                                         <label for="customfield{$customfields[2].id}">{$customfields[2].name}</label>
                                         {$customfields[2].input}
                                         {if $customfields[2].description}
-                                            <span class="field-help-text" onclick="this.previousElementSibling.type='text'">
+                                            <span class="field-help-text" onclick="togglePWView(this)">
                                                 &#x1F441; {$customfields[2].description}
                                             </span>
                                         {/if}