form.ejs 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <div class="modal-content">
  2. <div class="modal-header">
  3. <h5 class="modal-title"><%- i18n('certificates', 'form-title', {provider: provider}) %></h5>
  4. <button type="button" class="close cancel" aria-label="Close" data-dismiss="modal">&nbsp;</button>
  5. </div>
  6. <div class="modal-body">
  7. <form>
  8. <div class="row">
  9. <% if (provider === 'letsencrypt') { %>
  10. <div class="col-sm-12 col-md-12">
  11. <div class="form-group">
  12. <label class="form-label"><%- i18n('all-hosts', 'domain-names') %> <span class="form-required">*</span></label>
  13. <input type="text" name="domain_names" class="form-control" id="input-domains" value="<%- domain_names.join(',') %>" required>
  14. <div class="text-blue"><i class="fe fe-alert-triangle"></i> <%- i18n('ssl', 'hosts-warning') %></div>
  15. </div>
  16. </div>
  17. <div class="col-sm-12 col-md-12">
  18. <div class="form-group">
  19. <label class="form-label"><%- i18n('ssl', 'letsencrypt-email') %> <span class="form-required">*</span></label>
  20. <input name="meta[letsencrypt_email]" type="email" class="form-control" placeholder="" value="<%- getLetsencryptEmail() %>" required>
  21. </div>
  22. </div>
  23. <div class="col-sm-12 col-md-12">
  24. <div class="form-group">
  25. <label class="custom-switch">
  26. <input type="checkbox" class="custom-switch-input" name="meta[letsencrypt_agree]" value="1" required<%- getLetsencryptAgree() ? ' checked' : '' %>>
  27. <span class="custom-switch-indicator"></span>
  28. <span class="custom-switch-description"><%= i18n('ssl', 'letsencrypt-agree', {url: 'https://letsencrypt.org/repository/'}) %> <span class="form-required">*</span></span>
  29. </label>
  30. </div>
  31. </div>
  32. <% } else if (provider === 'other') { %>
  33. <!-- Other -->
  34. <div class="col-sm-12 col-md-12">
  35. <div class="form-group">
  36. <label class="form-label"><%- i18n('str', 'name') %> <span class="form-required">*</span></label>
  37. <input name="nice_name" type="text" class="form-control" placeholder="" value="<%- nice_name %>" required>
  38. </div>
  39. </div>
  40. <div class="col-sm-12 col-md-12 other-ssl">
  41. <div class="form-group">
  42. <div class="form-label"><%- i18n('certificates', 'other-certificate-key') %><span class="form-required">*</span></div>
  43. <div class="custom-file">
  44. <input type="file" class="custom-file-input" name="meta[other_certificate_key]" id="other_certificate_key" required>
  45. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="col-sm-12 col-md-12 other-ssl">
  50. <div class="form-group">
  51. <div class="form-label"><%- i18n('certificates', 'other-certificate') %><span class="form-required">*</span></div>
  52. <div class="custom-file">
  53. <input type="file" class="custom-file-input" name="meta[other_certificate]" id="other_certificate">
  54. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="col-sm-12 col-md-12 other-ssl">
  59. <div class="form-group">
  60. <div class="form-label"><%- i18n('certificates', 'other-intermediate-certificate') %></div>
  61. <div class="custom-file">
  62. <input type="file" class="custom-file-input" name="meta[other_intermediate_certificate]" id="other_intermediate_certificate">
  63. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  64. </div>
  65. </div>
  66. </div>
  67. <% } %>
  68. </div>
  69. </form>
  70. </div>
  71. <div class="modal-footer">
  72. <button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
  73. <button type="button" class="btn btn-teal save"><%- i18n('str', 'save') %></button>
  74. </div>
  75. </div>