settingBody.jade 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. template(name="setting")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-title
  7. span {{_ 'settings'}}
  8. .content-body
  9. .side-menu
  10. ul
  11. li.active
  12. a.js-setting-menu(data-id="registration-setting") {{_ 'registration'}}
  13. li
  14. a.js-setting-menu(data-id="email-setting") {{_ 'email'}}
  15. li
  16. a.js-setting-menu(data-id="account-setting") {{_ 'accounts'}}
  17. li
  18. a.js-setting-menu(data-id="announcement-setting") {{_ 'admin-announcement'}}
  19. li
  20. a.js-setting-menu(data-id="layout-setting") {{_ 'layout'}}
  21. li
  22. a.js-setting-menu(data-id="webhook-setting") {{_ 'global-webhook'}}
  23. .main-body
  24. if loading.get
  25. +spinner
  26. else if generalSetting.get
  27. +general
  28. else if emailSetting.get
  29. +email
  30. else if accountSetting.get
  31. +accountSettings
  32. else if announcementSetting.get
  33. +announcementSettings
  34. else if layoutSetting.get
  35. +layoutSettings
  36. else if webhookSetting.get
  37. +webhookSettings
  38. template(name="webhookSettings")
  39. span
  40. +outgoingWebhooksPopup
  41. template(name="general")
  42. ul#registration-setting.setting-detail
  43. li
  44. a.flex.js-toggle-registration
  45. .materialCheckBox(class="{{#if currentSetting.disableRegistration}}is-checked{{/if}}")
  46. span {{_ 'disable-self-registration'}}
  47. li
  48. .invite-people(class="{{#if currentSetting.disableRegistration}}{{else}}hide{{/if}}")
  49. ul
  50. li
  51. .title {{_ 'invite-people'}}
  52. textarea#email-to-invite.wekan-form-control(rows='5', placeholder="{{_ 'email-addresses'}}")
  53. li
  54. .title {{_ 'to-boards'}}
  55. .bg-white
  56. each boards
  57. a.option.flex.js-toggle-board-choose(id= _id)
  58. .materialCheckBox(data-id= _id)
  59. span= title
  60. li
  61. button.js-email-invite.primary {{_ 'invite'}}
  62. template(name='email')
  63. ul#email-setting.setting-detail
  64. li.smtp-form
  65. .title {{_ 'smtp-host'}}
  66. .description {{_ 'smtp-host-description'}}
  67. .form-group
  68. input.wekan-form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
  69. li.smtp-form
  70. .title {{_ 'smtp-port'}}
  71. .description {{_ 'smtp-port-description'}}
  72. .form-group
  73. input.wekan-form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
  74. li.smtp-form
  75. .title {{_ 'smtp-username'}}
  76. .form-group
  77. input.wekan-form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
  78. li.smtp-form
  79. .title {{_ 'smtp-password'}}
  80. .form-group
  81. input.wekan-form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}")
  82. li.smtp-form
  83. .title {{_ 'smtp-tls'}}
  84. .form-group
  85. a.flex.js-toggle-tls
  86. .materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
  87. span {{_ 'smtp-tls-description'}}
  88. li.smtp-form
  89. .title {{_ 'send-from'}}
  90. .form-group
  91. input.wekan-form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
  92. li
  93. button.js-save.primary {{_ 'save'}}
  94. li
  95. button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
  96. template(name='accountSettings')
  97. ul#account-setting.setting-detail
  98. li.accounts-form
  99. .title {{_ 'accounts-allowEmailChange'}}
  100. .form-group.flex
  101. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
  102. span {{_ 'yes'}}
  103. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
  104. span {{_ 'no'}}
  105. li
  106. li.accounts-form
  107. .title {{_ 'accounts-allowUserNameChange'}}
  108. .form-group.flex
  109. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
  110. span {{_ 'yes'}}
  111. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
  112. span {{_ 'no'}}
  113. li
  114. li.accounts-form
  115. .title {{_ 'accounts-allowUserDelete'}}
  116. .form-group.flex
  117. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
  118. span {{_ 'yes'}}
  119. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
  120. span {{_ 'no'}}
  121. li
  122. button.js-accounts-save.primary {{_ 'save'}}
  123. template(name='announcementSettings')
  124. ul#announcement-setting.setting-detail
  125. li
  126. a.flex.js-toggle-activemessage
  127. .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}")
  128. span {{_ 'admin-announcement-active'}}
  129. li
  130. .admin-announcement(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}")
  131. ul
  132. li
  133. .title {{_ 'admin-announcement-title'}}
  134. textarea#admin-announcement.wekan-form-control= currentSetting.body
  135. li
  136. button.js-announcement-save.primary {{_ 'save'}}
  137. template(name='layoutSettings')
  138. ul#layout-setting.setting-detail
  139. //li.layout-form
  140. .title {{_ 'hide-logo'}}
  141. .form-group.flex
  142. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
  143. span {{_ 'yes'}}
  144. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
  145. span {{_ 'no'}}
  146. li.layout-form
  147. .title {{_ 'display-authentication-method'}}
  148. .form-group.flex
  149. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
  150. span {{_ 'yes'}}
  151. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
  152. span {{_ 'no'}}
  153. li.layout-form
  154. .title {{_ 'default-authentication-method'}}
  155. +selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
  156. li.layout-form
  157. .title {{_ 'custom-product-name'}}
  158. .form-group
  159. input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
  160. li.layout-form
  161. .title {{_ 'add-custom-html-after-body-start'}}
  162. textarea#customHTMLafterBodyStart.wekan-form-control= currentSetting.customHTMLafterBodyStart
  163. li.layout-form
  164. .title {{_ 'add-custom-html-before-body-end'}}
  165. textarea#customHTMLbeforeBodyEnd.wekan-form-control= currentSetting.customHTMLbeforeBodyEnd
  166. li
  167. button.js-save-layout.primary {{_ 'save'}}
  168. template(name='selectAuthenticationMethod')
  169. select#defaultAuthenticationMethod
  170. each authentications
  171. if isSelected value
  172. option(value="{{value}}" selected) {{_ value}}
  173. else
  174. option(value="{{value}}") {{_ value}}