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