innhold/content/underskriftskampanje/medisinsk-cannabis-pa-resept/send-bekreftelse-pa-nytt/01-content.php
Ruben 201f5ebb6a 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.
2026-02-02 00:26:42 +01:00

25 lines
1,009 B
PHP

<h1>Send bekreftelse 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>