login: forward redirect parameters on post form
[minimedit.git] / login / form.inc.php
1 <h2>Inloggen</h2>
2
3 <form action="?" method="post">
4         <input type="hidden" name="goto" value="<?php print htmlspecialchars(@$_REQUEST['goto']); ?>" />
5         <input id="login" name="login" placeholder="Gebruikersnaam" value="<?php
6                 if (isset($_POST['login'])) print htmlspecialchars($_POST['login']);
7         ?>" />
8         <input id="pass" name="pass" type="password" value="" placeholder="Wachtwoord" />
9         <input type="submit" value="Log in" />
10 </form>
11
12 <?php if (!isset($_POST['mail'])) { ?>
13 <p><a onclick="document.getElementById('mailpass').removeAttribute('hidden'); this.remove()">Wachtwoord vergeten?</a></p>
14 <?php } ?>
15
16 <form id="mailpass" action="/login/mailpass" method="post"<?php if (!isset($_POST['mail'])) { ?> hidden<?php } ?>>
17         <h3>Wachtwoord vergeten</h3>
18         <p>Als er een e-mailadres was ingesteld kun je hieronder een verzoek indienen om opnieuw een wachtwoord in te stellen.</p>
19         <input type="email" id="mail" name="mail" placeholder="E-mailadres" value="<?php
20                 if (isset($_POST['mail'])) print htmlspecialchars($_POST['mail']);
21         ?>" />
22         <input type="submit" value="Verstuur" />
23 </form>