Steuerkram/src/Views/suppliers/form.php

24 lines
989 B
PHP

<?php use Steuerkram\View; $h = fn($v) => View::h($v); ?>
<div class="card" style="max-width:480px">
<div class="card-body">
<form method="post" action="<?= $h($action) ?>">
<div class="form-group">
<label for="name">Lieferantenname *</label>
<input type="text" id="name" name="name"
value="<?= $h($supplier['name'] ?? '') ?>"
class="<?= isset($errors['name']) ? 'input-error' : '' ?>"
required autofocus>
<?php if (isset($errors['name'])): ?>
<div class="error-text"><?= $h($errors['name']) ?></div>
<?php endif; ?>
</div>
<div style="display:flex;gap:.75rem;margin-top:1rem">
<button type="submit" class="btn btn-primary">Speichern</button>
<a href="/suppliers" class="btn btn-secondary">Abbrechen</a>
</div>
</form>
</div>
</div>