form.ejs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <div class="modal-content">
  2. <div class="modal-header">
  3. <h5 class="modal-title"><%- i18n('streams', '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">
  7. <form>
  8. <div class="row">
  9. <div class="col-sm-12 col-md-12">
  10. <div class="form-group">
  11. <label class="form-label"><%- i18n('streams', 'incoming-port') %> <span class="form-required">*</span></label>
  12. <input name="incoming_port" type="number" class="form-control text-monospace" placeholder="eg: 8080" value="<%- incoming_port %>" required>
  13. </div>
  14. </div>
  15. <div class="col-sm-8 col-md-8">
  16. <div class="form-group">
  17. <label class="form-label"><%- i18n('streams', 'forwarding-host') %><span class="form-required">*</span></label>
  18. <input type="text" name="forwarding_host" class="form-control text-monospace" value="<%- forwarding_host %>" autocomplete="off" required>
  19. </div>
  20. </div>
  21. <div class="col-sm-4 col-md-4">
  22. <div class="form-group">
  23. <label class="form-label"><%- i18n('streams', 'forwarding-port') %> <span class="form-required">*</span></label>
  24. <input name="forwarding_port" type="number" class="form-control text-monospace" placeholder="eg: 80" value="<%- forwarding_port %>" required>
  25. </div>
  26. </div>
  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="tcp_forwarding" value="1"<%- tcp_forwarding ? ' checked' : '' %>>
  31. <span class="custom-switch-indicator"></span>
  32. <span class="custom-switch-description"><%- i18n('streams', 'tcp-forwarding') %></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="udp_forwarding" value="1"<%- udp_forwarding ? ' checked' : '' %>>
  40. <span class="custom-switch-indicator"></span>
  41. <span class="custom-switch-description"><%- i18n('streams', 'udp-forwarding') %></span>
  42. </label>
  43. </div>
  44. </div>
  45. <div class="col-sm-12 col-md-12">
  46. <div class="forward-type-error invalid-feedback"><%- i18n('streams', 'forward-type-error') %></div>
  47. </div>
  48. </div>
  49. </form>
  50. </div>
  51. <div class="modal-footer">
  52. <button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
  53. <button type="button" class="btn btn-teal save"><%- i18n('str', 'save') %></button>
  54. </div>
  55. </div>