add_domain.hbs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div class="content admin-create">
  2. <h2>Add domain</h2>
  3. <form
  4. id="add-domain-form"
  5. hx-post="/api/domains/admin"
  6. hx-target="closest .content"
  7. hx-swap="outerHTML"
  8. hx-indicator="closest .content"
  9. >
  10. <label class="{{#if errors.address}}error{{/if}}">
  11. Address:
  12. <input
  13. name="address"
  14. id="add-domain-address"
  15. type="text"
  16. placeholder="Address..."
  17. hx-preserve="true"
  18. />
  19. {{#if errors.address}}<p class="error">{{errors.address}}</p>{{/if}}
  20. </label>
  21. <label class="{{#if errors.homepage}}error{{/if}}">
  22. Homepage (optional):
  23. <input
  24. name="homepage"
  25. id="add-domain-homepage"
  26. type="text"
  27. placeholder="Homepage address.."
  28. hx-preserve="true"
  29. />
  30. {{#if errors.homepage}}<p class="error">{{errors.homepage}}</p>{{/if}}
  31. </label>
  32. <label class="checkbox">
  33. <input
  34. id="add-domain-banned"
  35. name="banned"
  36. type="checkbox"
  37. onchange="canSendVerificationEmail();"
  38. hx-preserve="true"
  39. />
  40. Banned
  41. </label>
  42. <div class="buttons">
  43. <button type="button" hx-on:click="closeDialog()">Cancel</button>
  44. <button type="submit" class="primary">
  45. <span>{{> icons/plus}}</span>
  46. Add
  47. </button>
  48. {{> icons/spinner}}
  49. </div>
  50. </form>
  51. <div id="dialog-error">
  52. {{#if error}}
  53. <p class="error">{{error}}</p>
  54. {{/if}}
  55. </div>
  56. </div>