Improve the resend confirmation flow by: - Consolidating multiple status messages into a single generic response - Adding HTML support for the result message - Moving the instruction text after the message display - Simplifying the PHP logic by removing redundant checks - Making the messaging more privacy-conscious by not revealing email existence - Adding a link to sign again in the result message The changes follow the project's minimal PHP philosophy while improving user experience and security.
25 lines
1,009 B
PHP
25 lines
1,009 B
PHP
<h1>Send bekreftelse på nytt</h1>
|
|
|
|
<?php if (!empty($petition_resend_message)): ?>
|
|
<div class="form-message form-message--<?= htmlspecialchars($petition_resend_message['type']) ?>" role="alert">
|
|
<?php if (!empty($petition_resend_message['html'])): ?>
|
|
<p><?= $petition_resend_message['text'] ?></p>
|
|
<?php else: ?>
|
|
<p><?= htmlspecialchars($petition_resend_message['text']) ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<p>Skriv inn e-postadressen du brukte da du signerte, så sender vi en ny bekreftelseslenke.</p>
|
|
|
|
<form method="post" action="" class="resend-form">
|
|
<div class="form-group">
|
|
<label for="resend_email">E-post</label>
|
|
<input type="email" id="resend_email" name="resend_email" placeholder="din@epost.no" required maxlength="100">
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="submit" name="petition_resend" class="button">Send på nytt</button>
|
|
</div>
|
|
</form>
|
|
<?php endif; ?>
|
|
|
|
<p><a href="../">Tilbake til underskriftskampanjen</a></p>
|