login/edit: password option in label
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 16 Jun 2018 20:58:33 +0000 (22:58 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 16 Jun 2018 20:58:33 +0000 (22:58 +0200)
login/edit.php

index 9611c7d8ba85a5cb25d820ff8f7c74a3f443e13e..4e52506bdf839fdb0699c00cd1bf4b5de3212cb2 100644 (file)
@@ -144,13 +144,19 @@ foreach ($cols as $col => &$colconf) {
 }
 
 if (isset($user['pass'])) {
-       $hide = empty($_POST['newpass']);
 ?>
-       <li id="pass"<?php if ($hide) print ' hidden style="display:none"'; ?>>
-               <label for="newpass">Wachtwoord:</label>
-               <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
-               <input type="password" name="newpass" value="" placeholder="Nieuw wachtwoord" />
-               <input type="password" name="passconf" value="" placeholder="Nogmaals" />
+       <li><label for="newpass">Wachtwoord:</label>
+<?php
+       if ($hide = empty($_POST['newpass'])) {
+?>
+               <a onclick="document.getElementById('pass').removeAttribute('hidden'); this.remove()">Wijzigen</a>
+<?php
+       }
+?>
+               <span id="pass"<?php if ($hide) print ' hidden'; ?>>
+                       <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
+                       <input type="password" name="newpass" value="" placeholder="Nieuw wachtwoord" />
+                       <input type="password" name="passconf" value="" placeholder="Nogmaals" />
 <?php
        if ($error = @$colwarn['pass']) {
                print " <span class=warn>$error</span>\n";
@@ -161,12 +167,5 @@ if (isset($user['pass'])) {
 }
 ?>
        </ul>
-       <input type="submit" value="Opslaan" />
+       <p><input type="submit" value="Opslaan" /></p>
 </form>
-
-<?php
-       if ($hide) {
-?>
-       <p><a onclick="document.getElementById('pass').removeAttribute('style'); this.remove()">Wachtwoord wijzigen</a></p>
-<?php
-       }