edit/page: omit link target options except for _blank
[minimedit.git] / login / form.inc.php
index 9c2a604448b9c52e11a147ad175f9ca7af7cce51..bfcb2dda07b9038420a7a8c4fc823b9a36027349 100644 (file)
@@ -2,8 +2,21 @@
 
 <form action="" method="post">
        <input id="login" name="login" placeholder="Gebruikersnaam" value="<?php
-               if (isset($_POST['login'])) print htmlspecialchars($_REQUEST['login']);
+               if (isset($_POST['login'])) print htmlspecialchars($_POST['login']);
        ?>" />
        <input id="pass" name="pass" type="password" value="" placeholder="Wachtwoord" />
        <input type="submit" value="Log in" />
 </form>
+
+<?php if (!isset($_POST['mail'])) { ?>
+<p><a onclick="document.getElementById('mailpass').removeAttribute('hidden'); this.remove()">Wachtwoord vergeten?</a></p>
+<?php } ?>
+
+<form id="mailpass" action="/login/mailpass" method="post"<?php if (!isset($_POST['mail'])) { ?> hidden<?php } ?>>
+       <h3>Wachtwoord vergeten</h3>
+       <p>Als er een e-mailadres was ingesteld kun je hieronder een verzoek indienen om opnieuw een wachtwoord in te stellen.</p>
+       <input type="email" id="mail" name="mail" placeholder="E-mailadres" value="<?php
+               if (isset($_POST['mail'])) print htmlspecialchars($_POST['mail']);
+       ?>" />
+       <input type="submit" value="Verstuur" />
+</form>