Files
fruehstuecksapp/views/pin_check.ejs

30 lines
1.2 KiB
Plaintext

<%- include('layout', { title: 'Kontostand abfragen' }) %>
<% override body %>
<div class="pin-check-container">
<% if (!success) { %>
<h2>Kontostand abfragen</h2>
<p>Bitte geben Sie Ihre 4-stellige PIN ein, um Ihren Kontostand abzufragen.</p>
<form action="/pin-check" method="POST">
<div class="form-group">
<label for="pin">PIN:</label>
<input type="password" id="pin" name="pin" required autofocus
pattern="\d{4}" title="Bitte genau 4 Ziffern eingeben" maxlength="4">
</div>
<button type="submit" class="btn">Kontostand abfragen</button>
</form>
<p><a href="/login">Zur Mitarbeiter-Anmeldung</a></p>
<% } else { %>
<h2>Kontostand für <%= account.name %></h2>
<div class="balance-display">
<p>Ihr aktueller Kontostand beträgt:</p>
<p class="balance-large"><%= account.balance.toFixed(2) %> €</p>
</div>
<p><a href="/pin-check" class="btn">Neue Abfrage</a></p>
<p><a href="/login">Zur Mitarbeiter-Anmeldung</a></p>
<% } %>
</div>
<% end %>