settingBody.jade 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. template(name="setting")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-title
  7. i.fa.fa-cog
  8. span {{_ 'settings'}}
  9. .content-body
  10. .side-menu
  11. ul
  12. li.active
  13. a.js-setting-menu(data-id="registration-setting")
  14. i.fa.fa-sign-in
  15. | {{_ 'registration'}}
  16. unless isSandstorm
  17. li
  18. a.js-setting-menu(data-id="email-setting")
  19. i.fa.fa-envelope
  20. | {{_ 'email'}}
  21. li
  22. a.js-setting-menu(data-id="account-setting")
  23. i.fa.fa-users
  24. | {{_ 'accounts'}}
  25. li
  26. a.js-setting-menu(data-id="tableVisibilityMode-setting")
  27. i.fa.fa-eye
  28. | {{_ 'tableVisibilityMode'}}
  29. li
  30. a.js-setting-menu(data-id="announcement-setting")
  31. i.fa.fa-bullhorn
  32. | {{_ 'admin-announcement'}}
  33. li
  34. a.js-setting-menu(data-id="layout-setting")
  35. i.fa.fa-object-group
  36. | {{_ 'layout'}}
  37. li
  38. a.js-setting-menu(data-id="webhook-setting")
  39. i.fa.fa-globe
  40. | {{_ 'global-webhook'}}
  41. .main-body
  42. if loading.get
  43. +spinner
  44. else if generalSetting.get
  45. +general
  46. else if emailSetting.get
  47. unless isSandstorm
  48. +email
  49. else if accountSetting.get
  50. +accountSettings
  51. else if tableVisibilityModeSetting.get
  52. +tableVisibilityModeSettings
  53. else if announcementSetting.get
  54. +announcementSettings
  55. else if layoutSetting.get
  56. +layoutSettings
  57. else if webhookSetting.get
  58. +webhookSettings
  59. template(name="webhookSettings")
  60. span
  61. +outgoingWebhooksPopup
  62. template(name="general")
  63. ul#registration-setting.setting-detail
  64. li
  65. a.flex.js-toggle-registration
  66. .materialCheckBox(class="{{#if currentSetting.disableRegistration}}is-checked{{/if}}")
  67. span {{_ 'disable-self-registration'}}
  68. li
  69. .invite-people(class="{{#if currentSetting.disableRegistration}}{{else}}hide{{/if}}")
  70. ul
  71. li
  72. .title {{_ 'invite-people'}}
  73. textarea#email-to-invite.wekan-form-control(rows='5', placeholder="{{_ 'email-addresses'}}")
  74. li
  75. .title {{_ 'to-boards'}}
  76. .bg-white
  77. each boards
  78. a.option.flex.js-toggle-board-choose(id= _id)
  79. .materialCheckBox(data-id= _id)
  80. span= title
  81. li
  82. button.js-email-invite.primary {{_ 'invite'}}
  83. template(name='email')
  84. ul#email-setting.setting-detail
  85. //if isSandstorm
  86. // li.smtp-form
  87. // .title {{_ 'smtp-host'}}
  88. // .description {{_ 'smtp-host-description'}}
  89. // .form-group
  90. // input.wekan-form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
  91. // li.smtp-form
  92. // .title {{_ 'smtp-port'}}
  93. // .description {{_ 'smtp-port-description'}}
  94. // .form-group
  95. // input.wekan-form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
  96. // li.smtp-form
  97. // .title {{_ 'smtp-username'}}
  98. // .form-group
  99. // input.wekan-form-control#mail-server-u"accounts-allowUserNameChange": "Allow Username Change",sername(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
  100. // li.smtp-form
  101. // .title {{_ 'smtp-password'}}
  102. // .form-group
  103. // input.wekan-form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="")
  104. // li.smtp-form
  105. // .title {{_ 'smtp-tls'}}
  106. // .form-group
  107. // a.flex.js-toggle-tls
  108. // .materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
  109. //
  110. // span {{_ 'smtp-tls-description'}}
  111. //
  112. // li.smtp-form
  113. // .title {{_ 'send-from'}}
  114. // .form-group
  115. // input.wekan-form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
  116. //
  117. // li
  118. // button.js-save.primary {{_ 'save'}}
  119. li
  120. button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
  121. template(name='tableVisibilityModeSettings')
  122. ul#tableVisibilityMode-setting.setting-detail
  123. li.tableVisibilityMode-form
  124. .title {{_ 'tableVisibilityMode-allowPrivateOnly'}}
  125. .form-group.flex
  126. input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="true" checked="{{#if allowPrivateOnly}}checked{{/if}}")
  127. span {{_ 'yes'}}
  128. input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="false" checked="{{#unless allowPrivateOnly}}checked{{/unless}}")
  129. span {{_ 'no'}}
  130. button.js-tableVisibilityMode-save.primary {{_ 'save'}}
  131. template(name='accountSettings')
  132. ul#account-setting.setting-detail
  133. li
  134. button.js-all-hide-system-messages.primary {{_ 'hide-system-messages-of-all-users'}}
  135. li.accounts-form
  136. .title {{_ 'accounts-allowEmailChange'}}
  137. .form-group.flex
  138. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
  139. span {{_ 'yes'}}
  140. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
  141. span {{_ 'no'}}
  142. .title {{_ 'accounts-allowUserNameChange'}}
  143. .form-group.flex
  144. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
  145. span {{_ 'yes'}}
  146. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
  147. span {{_ 'no'}}
  148. .title {{_ 'accounts-allowUserDelete'}}
  149. .form-group.flex
  150. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
  151. span {{_ 'yes'}}
  152. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
  153. span {{_ 'no'}}
  154. button.js-accounts-save.primary {{_ 'save'}}
  155. template(name='announcementSettings')
  156. ul#announcement-setting.setting-detail
  157. li
  158. a.flex.js-toggle-activemessage
  159. .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}")
  160. span {{_ 'admin-announcement-active'}}
  161. li
  162. .admin-announcement(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}")
  163. ul
  164. li
  165. .title {{_ 'admin-announcement-title'}}
  166. textarea#admin-announcement.wekan-form-control= currentSetting.body
  167. li
  168. button.js-announcement-save.primary {{_ 'save'}}
  169. template(name='layoutSettings')
  170. ul#layout-setting.setting-detail
  171. li.layout-form
  172. .title {{_ 'oidc-button-text'}}
  173. .form-group
  174. input.wekan-form-control#oidcBtnTextvalue(type="text", placeholder="" value="{{currentSetting.oidcBtnText}}")
  175. li.layout-form
  176. .title {{_ 'can-invite-if-same-mailDomainName'}}
  177. .form-group
  178. input.wekan-form-control#mailDomainNamevalue(type="text", placeholder="" value="{{currentSetting.mailDomainName}}")
  179. li.layout-form
  180. .title {{_ 'custom-legal-notice-link-url'}}
  181. .form-group
  182. input.wekan-form-control#legalNoticevalue(type="text", placeholder="" value="{{currentSetting.legalNotice}}")
  183. li.layout-form
  184. .title {{_ 'display-authentication-method'}}
  185. .form-group.flex
  186. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
  187. span {{_ 'yes'}}
  188. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
  189. span {{_ 'no'}}
  190. li.layout-form
  191. .title {{_ 'default-authentication-method'}}
  192. +selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
  193. li.layout-form
  194. .title {{_ 'wait-spinner'}}
  195. +selectSpinnerName(spinnerName=currentSetting.spinnerName)
  196. li.layout-form
  197. .title {{_ 'custom-product-name'}}
  198. .form-group
  199. input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
  200. li.layout-form
  201. .title {{_ 'hide-logo'}}
  202. .form-group.flex
  203. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
  204. span {{_ 'yes'}}
  205. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
  206. span {{_ 'no'}}
  207. li.layout-form
  208. .title {{_ 'custom-login-logo-image-url'}}
  209. .form-group
  210. input.wekan-form-control#custom-login-logo-image-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoImageUrl}}")
  211. li.layout-form
  212. .title {{_ 'custom-login-logo-link-url'}}
  213. .form-group
  214. input.wekan-form-control#custom-login-logo-link-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoLinkUrl}}")
  215. li.layout-form
  216. .title {{_ 'text-below-custom-login-logo'}}
  217. .form-group
  218. textarea#text-below-custom-login-logo.wekan-form-control= currentSetting.textBelowCustomLoginLogo
  219. li.layout-form
  220. .title {{_ 'custom-top-left-corner-logo-image-url'}}
  221. .form-group
  222. input.wekan-form-control#custom-top-left-corner-logo-image-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoImageUrl}}")
  223. li.layout-form
  224. .title {{_ 'custom-top-left-corner-logo-link-url'}}
  225. .form-group
  226. input.wekan-form-control#custom-top-left-corner-logo-link-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoLinkUrl}}")
  227. li.layout-form
  228. .title {{_ 'custom-top-left-corner-logo-height'}}
  229. .form-group
  230. input.wekan-form-control#custom-top-left-corner-logo-height(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoHeight}}")
  231. li.layout-form
  232. .title {{_ 'automatic-linked-url-schemes'}}
  233. .form-group
  234. textarea#automatic-linked-url-schemes.wekan-form-control= currentSetting.automaticLinkedUrlSchemes
  235. li
  236. button.js-save-layout.primary {{_ 'save'}}
  237. template(name='selectAuthenticationMethod')
  238. select#defaultAuthenticationMethod
  239. each authentications
  240. if isSelected value
  241. option(value="{{value}}" selected) {{_ value}}
  242. else
  243. option(value="{{value}}") {{_ value}}
  244. template(name='selectSpinnerName')
  245. select#spinnerName
  246. each spinner in spinners
  247. if isSelected spinner
  248. option(value="{{spinner}}" selected) {{_ spinner}}
  249. else
  250. option(value="{{spinner}}") {{_ spinner}}