25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

65 satır
3.1KB

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

Powered by TurnKey Linux.