form.ejs 5.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. <!-- CloudFlare -->
  24. <div class="col-sm-12 col-md-12">
  25. <div class="form-group">
  26. <label class="custom-switch">
  27. <input type="checkbox" class="custom-switch-input" name="meta[cloudflare_use]" value="1">
  28. <span class="custom-switch-indicator"></span>
  29. <span class="custom-switch-description"><%= i18n('ssl', 'use-cloudflare') %></span>
  30. </label>
  31. </div>
  32. </div>
  33. <div class="col-sm-12 col-md-12 cloudflare">
  34. <div class="form-group">
  35. <label class="form-label">CloudFlare DNS API Token <span class="form-required">*</span></label>
  36. <input type="text" name="meta[cloudflare_token]" class="form-control" id="cloudflare_token" required>
  37. </div>
  38. </div>
  39. <div class="col-sm-12 col-md-12">
  40. <div class="form-group">
  41. <label class="custom-switch">
  42. <input type="checkbox" class="custom-switch-input" name="meta[letsencrypt_agree]" value="1" required<%- getLetsencryptAgree() ? ' checked' : '' %>>
  43. <span class="custom-switch-indicator"></span>
  44. <span class="custom-switch-description"><%= i18n('ssl', 'letsencrypt-agree', {url: 'https://letsencrypt.org/repository/'}) %> <span class="form-required">*</span></span>
  45. </label>
  46. </div>
  47. </div>
  48. <% } else if (provider === 'other') { %>
  49. <!-- Other -->
  50. <div class="col-sm-12 col-md-12">
  51. <div class="form-group">
  52. <label class="form-label"><%- i18n('str', 'name') %> <span class="form-required">*</span></label>
  53. <input name="nice_name" type="text" class="form-control" placeholder="" value="<%- nice_name %>" required>
  54. </div>
  55. </div>
  56. <div class="col-sm-12 col-md-12 other-ssl">
  57. <div class="form-group">
  58. <div class="form-label"><%- i18n('certificates', 'other-certificate-key') %><span class="form-required">*</span></div>
  59. <div class="custom-file">
  60. <input type="file" class="custom-file-input" name="meta[other_certificate_key]" id="other_certificate_key" required>
  61. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="col-sm-12 col-md-12 other-ssl">
  66. <div class="form-group">
  67. <div class="form-label"><%- i18n('certificates', 'other-certificate') %><span class="form-required">*</span></div>
  68. <div class="custom-file">
  69. <input type="file" class="custom-file-input" name="meta[other_certificate]" id="other_certificate">
  70. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="col-sm-12 col-md-12 other-ssl">
  75. <div class="form-group">
  76. <div class="form-label"><%- i18n('certificates', 'other-intermediate-certificate') %></div>
  77. <div class="custom-file">
  78. <input type="file" class="custom-file-input" name="meta[other_intermediate_certificate]" id="other_intermediate_certificate">
  79. <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label>
  80. </div>
  81. </div>
  82. </div>
  83. <% } %>
  84. </div>
  85. </form>
  86. </div>
  87. <div class="modal-footer">
  88. <button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
  89. <button type="button" class="btn btn-teal save"><%- i18n('str', 'save') %></button>
  90. </div>
  91. </div>