Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

66 рядки
3.2KB

  1. <div class="page-header">
  2. <h1>Edit Householder Name</h1>
  3. <a class="button button-secondary button-sm"
  4. href="/householder-names/<?= e($name['id']) ?>">← Back</a>
  5. </div>
  6. <div class="section-panel">
  7. <?php if (!empty($errors['_token'])): ?>
  8. <div class="alert alert-error"><?= e($errors['_token'][0]) ?></div>
  9. <?php endif; ?>
  10. <form method="POST" action="/householder-names/<?= e($name['id']) ?>" novalidate>
  11. <?= csrf_field() ?>
  12. <div class="form-grid">
  13. <div class="field" style="grid-column:1/-1">
  14. <label for="household_id">Household <span style="color:#c0392b">*</span></label>
  15. <select class="input <?= isset($errors['household_id']) ? 'input-error' : '' ?>"
  16. id="household_id" name="household_id" required>
  17. <option value="">Select a household…</option>
  18. <?php foreach ($households as $h): ?>
  19. <option value="<?= e($h['id']) ?>"
  20. <?= (string) $name['household_id'] === (string) $h['id'] ? 'selected' : '' ?>>
  21. <?= e($h['address']) ?>
  22. </option>
  23. <?php endforeach; ?>
  24. </select>
  25. <?php if (isset($errors['household_id'])): ?>
  26. <span class="field-error"><?= e($errors['household_id'][0]) ?></span>
  27. <?php endif; ?>
  28. </div>
  29. <div class="field" style="grid-column:1/-1">
  30. <label for="name">Name <span style="color:#c0392b">*</span></label>
  31. <input class="input <?= isset($errors['name']) ? 'input-error' : '' ?>"
  32. type="text" id="name" name="name"
  33. value="<?= e((string) ($name['name'] ?? '')) ?>" required autofocus>
  34. <?php if (isset($errors['name'])): ?>
  35. <span class="field-error"><?= e($errors['name'][0]) ?></span>
  36. <?php endif; ?>
  37. </div>
  38. <div class="field" style="grid-column:1/-1">
  39. <label class="checkbox-label">
  40. <input type="checkbox" name="letter_returned" value="1"
  41. id="lr_check"
  42. <?= $name['letter_returned'] ? 'checked' : '' ?>
  43. onchange="document.getElementById('lr_date_field').style.display=this.checked?'grid':'none'">
  44. Letter Returned
  45. </label>
  46. </div>
  47. <div id="lr_date_field" class="field" style="grid-column:1/-1;display:<?= $name['letter_returned'] ? 'grid' : 'none' ?>">
  48. <label for="return_date">Return Date</label>
  49. <input class="input" type="datetime-local" id="return_date" name="return_date"
  50. value="<?= e((string) ($name['return_date'] ?? '')) ?>">
  51. </div>
  52. </div>
  53. <div class="form-actions" style="margin-top:1.5rem">
  54. <button class="button button-primary" type="submit">Save Changes</button>
  55. <a class="button button-secondary" href="/householder-names/<?= e($name['id']) ?>">Cancel</a>
  56. </div>
  57. </form>
  58. </div>

Powered by TurnKey Linux.