form.ejs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <div class="modal-content">
  2. <div class="modal-header">
  3. <h5 class="modal-title"><%- i18n('dead-hosts', 'form-title', {id: id}) %></h5>
  4. <button type="button" class="close cancel" aria-label="Close" data-dismiss="modal">&nbsp;</button>
  5. </div>
  6. <div class="modal-body has-tabs">
  7. <form>
  8. <ul class="nav nav-tabs" role="tablist">
  9. <li role="presentation" class="nav-item"><a href="#details" aria-controls="tab1" role="tab" data-toggle="tab" class="nav-link active"><i class="fe fe-zap"></i> <%- i18n('all-hosts', 'details') %></a></li>
  10. <li role="presentation" class="nav-item"><a href="#ssl-options" aria-controls="tab2" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-shield"></i> <%- i18n('str', 'ssl') %></a></li>
  11. </ul>
  12. <div class="tab-content">
  13. <!-- Details -->
  14. <div role="tabpanel" class="tab-pane active" id="details">
  15. <div class="row">
  16. <div class="col-sm-12 col-md-12">
  17. <div class="form-group">
  18. <label class="form-label"><%- i18n('all-hosts', 'domain-names') %> <span class="form-required">*</span></label>
  19. <input type="text" name="domain_names" class="form-control" id="input-domains" value="<%- domain_names.join(',') %>" required>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <!-- SSL -->
  25. <div role="tabpanel" class="tab-pane" id="ssl-options">
  26. <div class="row">
  27. <div class="col-sm-6 col-md-6">
  28. <div class="form-group">
  29. <label class="custom-switch">
  30. <input type="checkbox" class="custom-switch-input" name="ssl_enabled" value="1"<%- ssl_enabled ? ' checked' : '' %>>
  31. <span class="custom-switch-indicator"></span>
  32. <span class="custom-switch-description"><%- i18n('all-hosts', 'enable-ssl') %></span>
  33. </label>
  34. </div>
  35. </div>
  36. <div class="col-sm-6 col-md-6">
  37. <div class="form-group">
  38. <label class="custom-switch">
  39. <input type="checkbox" class="custom-switch-input" name="ssl_forced" value="1"<%- ssl_forced ? ' checked' : '' %><%- ssl_enabled ? '' : ' disabled' %>>
  40. <span class="custom-switch-indicator"></span>
  41. <span class="custom-switch-description"><%- i18n('all-hosts', 'force-ssl') %></span>
  42. </label>
  43. </div>
  44. </div>
  45. <div class="col-sm-12 col-md-12">
  46. <div class="form-group">
  47. <label class="form-label"><%- i18n('all-hosts', 'cert-provider') %></label>
  48. <div class="selectgroup w-100">
  49. <label class="selectgroup-item">
  50. <input type="radio" name="ssl_provider" value="letsencrypt" class="selectgroup-input"<%- ssl_provider !== 'other' ? ' checked' : '' %>>
  51. <span class="selectgroup-button"><%- i18n('ssl', 'letsencrypt') %></span>
  52. </label>
  53. <label class="selectgroup-item">
  54. <input type="radio" name="ssl_provider" value="other" class="selectgroup-input"<%- ssl_provider === 'other' ? ' checked' : '' %>>
  55. <span class="selectgroup-button"><%- i18n('ssl', 'other') %></span>
  56. </label>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- Lets encrypt -->
  61. <div class="col-sm-12 col-md-12 letsencrypt-ssl">
  62. <div class="form-group">
  63. <label class="form-label"><%- i18n('ssl', 'letsencrypt-email') %> <span class="form-required">*</span></label>
  64. <input name="meta[letsencrypt_email]" type="email" class="form-control" placeholder="" value="<%- getLetsencryptEmail() %>" required>
  65. </div>
  66. </div>
  67. <div class="col-sm-12 col-md-12 letsencrypt-ssl">
  68. <div class="form-group">
  69. <label class="custom-switch">
  70. <input type="checkbox" class="custom-switch-input" name="meta[letsencrypt_agree]" value="1" required<%- getLetsencryptAgree() ? ' checked' : '' %>>
  71. <span class="custom-switch-indicator"></span>
  72. <span class="custom-switch-description"><%= i18n('ssl', 'letsencrypt-agree', {url: 'https://letsencrypt.org/repository/'}) %> <span class="form-required">*</span></span>
  73. </label>
  74. </div>
  75. </div>
  76. <!-- Other -->
  77. <div class="col-sm-12 col-md-12 other-ssl">
  78. <div class="form-group">
  79. <div class="form-label"><%- i18n('all-hosts', 'other-certificate') %></div>
  80. <div class="custom-file">
  81. <input type="file" class="custom-file-input" name="meta[other_ssl_certificate]" id="other_ssl_certificate">
  82. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="col-sm-12 col-md-12 other-ssl">
  87. <div class="form-group">
  88. <div class="form-label"><%- i18n('all-hosts', 'other-certificate-key') %></div>
  89. <div class="custom-file">
  90. <input type="file" class="custom-file-input" name="meta[other_ssl_certificate_key]" id="other_ssl_certificate_key">
  91. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </form>
  99. </div>
  100. <div class="modal-footer">
  101. <button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
  102. <button type="button" class="btn btn-teal save"><%- i18n('str', 'save') %></button>
  103. </div>
  104. </div>