Update resend confirmation flow with improved messaging

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.
This commit is contained in:
Ruben 2026-02-02 00:26:42 +01:00
parent c8efa479bc
commit 201f5ebb6a
3 changed files with 25 additions and 33 deletions

View file

@ -1,12 +1,15 @@
<h1>Send bekreftelse nytt</h1>
<p>Skriv inn e-postadressen du brukte da du signerte, sender vi en ny bekreftelseslenke.</p>
<?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 endif; ?>
<?php else: ?>
<p>Skriv inn e-postadressen du brukte da du signerte, sender vi en ny bekreftelseslenke.</p>
<form method="post" action="" class="resend-form">
<div class="form-group">
@ -17,5 +20,6 @@
<button type="submit" name="petition_resend" class="button">Send nytt</button>
</div>
</form>
<?php endif; ?>
<p><a href="../">Tilbake til underskriftskampanjen</a></p>