settingBody.jade 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. template(name="setting")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-title.ext-box
  7. if loading.get
  8. +spinner
  9. else if generalSetting.get
  10. span
  11. i.fa.fa-sign-in
  12. | {{_ 'registration'}}
  13. else if emailSetting.get
  14. span
  15. i.fa.fa-envelope
  16. | {{_ 'email'}}
  17. else if accountSetting.get
  18. span
  19. i.fa.fa-users
  20. | {{_ 'accounts'}}
  21. else if tableVisibilityModeSetting.get
  22. span
  23. i.fa.fa-eye
  24. | {{_ 'tableVisibilityMode'}}
  25. else if announcementSetting.get
  26. span
  27. i.fa.fa-bullhorn
  28. | {{_ 'admin-announcement'}}
  29. else if accessibilitySetting.get
  30. span
  31. i.fa.fa-universal-access
  32. | {{_ 'accessibility'}}
  33. else if layoutSetting.get
  34. span
  35. i.fa.fa-object-group
  36. | {{_ 'layout'}}
  37. else if webhookSetting.get
  38. span
  39. i.fa.fa-globe
  40. | {{_ 'global-webhook'}}
  41. else if attachmentSettings.get
  42. span
  43. i.fa.fa-paperclip
  44. | {{_ 'attachments'}}
  45. else if cronSettings.get
  46. span
  47. i.fa.fa-clock-o
  48. | {{_ 'cron'}}
  49. .content-body
  50. .side-menu
  51. ul
  52. li(class="{{#if generalSetting}}active{{/if}}")
  53. a.js-setting-menu(data-id="registration-setting")
  54. i.fa.fa-sign-in
  55. | {{_ 'registration'}}
  56. unless isSandstorm
  57. li(class="{{#if emailSetting}}active{{/if}}")
  58. a.js-setting-menu(data-id="email-setting")
  59. i.fa.fa-envelope
  60. | {{_ 'email'}}
  61. li(class="{{#if accountSetting}}active{{/if}}")
  62. a.js-setting-menu(data-id="account-setting")
  63. i.fa.fa-users
  64. | {{_ 'accounts'}}
  65. li(class="{{#if tableVisibilityModeSetting}}active{{/if}}")
  66. a.js-setting-menu(data-id="tableVisibilityMode-setting")
  67. i.fa.fa-eye
  68. | {{_ 'tableVisibilityMode'}}
  69. li(class="{{#if announcementSetting}}active{{/if}}")
  70. a.js-setting-menu(data-id="announcement-setting")
  71. i.fa.fa-bullhorn
  72. | {{_ 'admin-announcement'}}
  73. li(class="{{#if accessibilitySetting}}active{{/if}}")
  74. a.js-setting-menu(data-id="accessibility-setting")
  75. i.fa.fa-universal-access
  76. | {{_ 'accessibility'}}
  77. li(class="{{#if layoutSetting}}active{{/if}}")
  78. a.js-setting-menu(data-id="layout-setting")
  79. i.fa.fa-object-group
  80. | {{_ 'layout'}}
  81. li(class="{{#if webhookSetting}}active{{/if}}")
  82. a.js-setting-menu(data-id="webhook-setting")
  83. i.fa.fa-globe
  84. | {{_ 'global-webhook'}}
  85. li(class="{{#if attachmentSettings}}active{{/if}}")
  86. a.js-setting-menu(data-id="attachment-settings")
  87. i.fa.fa-paperclip
  88. | {{_ 'attachments'}}
  89. li(class="{{#if cronSettings}}active{{/if}}")
  90. a.js-setting-menu(data-id="cron-settings")
  91. i.fa.fa-clock-o
  92. | {{_ 'cron'}}
  93. .main-body
  94. if loading.get
  95. +spinner
  96. else if attachmentSettings.get
  97. +attachmentSettings
  98. else if cronSettings.get
  99. +cronSettings
  100. else if generalSetting.get
  101. +general
  102. else if emailSetting.get
  103. unless isSandstorm
  104. +email
  105. else if accountSetting.get
  106. +accountSettings
  107. else if tableVisibilityModeSetting.get
  108. +tableVisibilityModeSettings
  109. else if announcementSetting.get
  110. +announcementSettings
  111. else if accessibilitySetting.get
  112. +accessibilitySettings
  113. else if layoutSetting.get
  114. +layoutSettings
  115. else if webhookSetting.get
  116. +webhookSettings
  117. template(name="webhookSettings")
  118. span
  119. +outgoingWebhooksPopup
  120. template(name="general")
  121. ul#registration-setting.setting-detail
  122. li
  123. a.flex.js-toggle-forgot-password
  124. .materialCheckBox(class="{{#if currentSetting.disableForgotPassword}}is-checked{{/if}}")
  125. span {{_ 'disable-forgot-password'}}
  126. li
  127. a.flex.js-toggle-registration
  128. .materialCheckBox(class="{{#if currentSetting.disableRegistration}}is-checked{{/if}}")
  129. span {{_ 'disable-self-registration'}}
  130. li
  131. .invite-people(class="{{#if currentSetting.disableRegistration}}{{else}}hide{{/if}}")
  132. ul
  133. li
  134. .title {{_ 'invite-people'}}
  135. textarea#email-to-invite.wekan-form-control(rows='5', placeholder="{{_ 'email-addresses'}}")
  136. li
  137. .title {{_ 'to-boards'}}
  138. .bg-white
  139. each boards
  140. a.option.flex.js-toggle-board-choose(id= _id)
  141. .materialCheckBox(data-id= _id)
  142. span= title
  143. li
  144. button.js-email-invite.primary {{_ 'invite'}}
  145. template(name='email')
  146. ul#email-setting.setting-detail
  147. //if isSandstorm
  148. // li.smtp-form
  149. // .title {{_ 'smtp-host'}}
  150. // .description {{_ 'smtp-host-description'}}
  151. // .form-group
  152. // input.wekan-form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
  153. // li.smtp-form
  154. // .title {{_ 'smtp-port'}}
  155. // .description {{_ 'smtp-port-description'}}
  156. // .form-group
  157. // input.wekan-form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
  158. // li.smtp-form
  159. // .title {{_ 'smtp-username'}}
  160. // .form-group
  161. // input.wekan-form-control#mail-server-u"accounts-allowUserNameChange": "Allow Username Change",sername(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
  162. // li.smtp-form
  163. // .title {{_ 'smtp-password'}}
  164. // .form-group
  165. // input.wekan-form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="")
  166. // li.smtp-form
  167. // .title {{_ 'smtp-tls'}}
  168. // .form-group
  169. // a.flex.js-toggle-tls
  170. // .materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
  171. //
  172. // span {{_ 'smtp-tls-description'}}
  173. //
  174. // li.smtp-form
  175. // .title {{_ 'send-from'}}
  176. // .form-group
  177. // input.wekan-form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
  178. //
  179. // li
  180. // button.js-save.primary {{_ 'save'}}
  181. li
  182. button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
  183. template(name='tableVisibilityModeSettings')
  184. ul#tableVisibilityMode-setting.setting-detail
  185. li.tableVisibilityMode-form
  186. .title {{_ 'tableVisibilityMode-allowPrivateOnly'}}
  187. .form-group.flex
  188. input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="true" checked="{{#if allowPrivateOnly}}checked{{/if}}")
  189. label {{_ 'yes'}}
  190. input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="false" checked="{{#unless allowPrivateOnly}}checked{{/unless}}")
  191. label {{_ 'no'}}
  192. button.js-tableVisibilityMode-save.primary {{_ 'save'}}
  193. template(name='accountSettings')
  194. ul#account-setting.setting-detail
  195. li.accounts-form
  196. .title {{_ 'accounts-allowEmailChange'}}
  197. .form-group.flex
  198. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
  199. label {{_ 'yes'}}
  200. input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
  201. label {{_ 'no'}}
  202. .title {{_ 'accounts-allowUserNameChange'}}
  203. .form-group.flex
  204. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
  205. label {{_ 'yes'}}
  206. input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
  207. label {{_ 'no'}}
  208. .title {{_ 'accounts-allowUserDelete'}}
  209. .form-group.flex
  210. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
  211. label {{_ 'yes'}}
  212. input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
  213. label {{_ 'no'}}
  214. button.js-accounts-save.primary {{_ 'save'}}
  215. // Brute force lockout settings moved to People/Locked Users section
  216. template(name='announcementSettings')
  217. ul#announcement-setting.setting-detail
  218. li
  219. a.flex.js-toggle-activemessage
  220. .materialCheckBox(class="{{#if currentAnnouncements.enabled}}is-checked{{/if}}")
  221. span {{_ 'admin-announcement-active'}}
  222. li
  223. .admin-announcement(class="{{#if currentAnnouncements.enabled}}{{else}}hide{{/if}}")
  224. ul
  225. li
  226. .title {{_ 'admin-announcement-title'}}
  227. textarea#admin-announcement.wekan-form-control= currentAnnouncements.body
  228. li
  229. button.js-announcement-save.primary {{_ 'save'}}
  230. template(name='accessibilitySettings')
  231. ul#accessibility-setting.setting-detail
  232. li
  233. a(href="/accessibility" style="text-decoration: underline; color: blue;") {{_ 'accessibility'}}
  234. li
  235. a.flex.js-toggle-accessibility
  236. .materialCheckBox(class="{{#if currentAccessibility.enabled}}is-checked{{/if}}")
  237. span {{_ 'accessibility-page-enabled'}}
  238. li
  239. .accessibility-content(class="{{#if currentAccessibility.enabled}}{{else}}hide{{/if}}")
  240. ul
  241. li
  242. .title {{_ 'accessibility-title'}}
  243. textarea#admin-accessibility-title.wekan-form-control= currentAccessibility.title
  244. li
  245. .title {{_ 'accessibility-content'}}
  246. textarea#admin-accessibility-content.wekan-form-control= currentAccessibility.body
  247. li
  248. button.js-accessibility-save.primary {{_ 'save'}}
  249. template(name='layoutSettings')
  250. ul#layout-setting.setting-detail
  251. li
  252. button.js-all-boards-hide-activities.primary {{_ 'hide-activities-of-all-boards'}}
  253. li.layout-form
  254. .title {{_ 'oidc-button-text'}}
  255. .form-group
  256. input.wekan-form-control#oidcBtnTextvalue(type="text", placeholder="" value="{{currentSetting.oidcBtnText}}")
  257. li.layout-form
  258. .title {{_ 'can-invite-if-same-mailDomainName'}}
  259. .form-group
  260. input.wekan-form-control#mailDomainNamevalue(type="text", placeholder="" value="{{currentSetting.mailDomainName}}")
  261. li.layout-form
  262. .title {{_ 'custom-legal-notice-link-url'}}
  263. .form-group
  264. input.wekan-form-control#legalNoticevalue(type="text", placeholder="" value="{{currentSetting.legalNotice}}")
  265. li.layout-form
  266. .title {{_ 'display-authentication-method'}}
  267. .form-group.flex
  268. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
  269. label {{_ 'yes'}}
  270. input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
  271. label {{_ 'no'}}
  272. li.layout-form
  273. .title {{_ 'default-authentication-method'}}
  274. +selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
  275. li.layout-form
  276. .title {{_ 'wait-spinner'}}
  277. +selectSpinnerName(spinnerName=currentSetting.spinnerName)
  278. li.layout-form
  279. .title {{_ 'custom-product-name'}}
  280. .form-group
  281. input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
  282. li.layout-form
  283. .title {{_ 'hide-logo'}}
  284. .form-group.flex
  285. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
  286. label {{_ 'yes'}}
  287. input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
  288. label {{_ 'no'}}
  289. li.layout-form
  290. .title {{_ 'custom-login-logo-image-url'}}
  291. .form-group
  292. input.wekan-form-control#custom-login-logo-image-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoImageUrl}}")
  293. li.layout-form
  294. .title {{_ 'custom-login-logo-link-url'}}
  295. .form-group
  296. input.wekan-form-control#custom-login-logo-link-url(type="text", placeholder="" value="{{currentSetting.customLoginLogoLinkUrl}}")
  297. li.layout-form
  298. .title {{_ 'custom-help-link-url'}}
  299. .form-group
  300. input.wekan-form-control#custom-help-link-url(type="text", placeholder="" value="{{currentSetting.customHelpLinkUrl}}")
  301. li.layout-form
  302. .title {{_ 'text-below-custom-login-logo'}}
  303. .form-group
  304. textarea#text-below-custom-login-logo.wekan-form-control= currentSetting.textBelowCustomLoginLogo
  305. li.layout-form
  306. .title {{_ 'custom-top-left-corner-logo-image-url'}}
  307. .form-group
  308. input.wekan-form-control#custom-top-left-corner-logo-image-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoImageUrl}}")
  309. li.layout-form
  310. .title {{_ 'custom-top-left-corner-logo-link-url'}}
  311. .form-group
  312. input.wekan-form-control#custom-top-left-corner-logo-link-url(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoLinkUrl}}")
  313. li.layout-form
  314. .title {{_ 'custom-top-left-corner-logo-height'}}
  315. .form-group
  316. input.wekan-form-control#custom-top-left-corner-logo-height(type="text", placeholder="" value="{{currentSetting.customTopLeftCornerLogoHeight}}")
  317. li.layout-form
  318. .title {{_ 'automatic-linked-url-schemes'}}
  319. .form-group
  320. textarea#automatic-linked-url-schemes.wekan-form-control= currentSetting.automaticLinkedUrlSchemes
  321. li.layout-form
  322. .title {{_ 'hide-card-counter-list'}}
  323. .form-group.flex
  324. input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="true" checked="{{#if currentSetting.hideCardCounterList}}checked{{/if}}")
  325. label {{_ 'yes'}}
  326. input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="false" checked="{{#unless currentSetting.hideCardCounterList}}checked{{/unless}}")
  327. label {{_ 'no'}}
  328. li.layout-form
  329. .title {{_ 'hide-board-member-list'}}
  330. .form-group.flex
  331. input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="true" checked="{{#if currentSetting.hideBoardMemberList}}checked{{/if}}")
  332. label {{_ 'yes'}}
  333. input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="false" checked="{{#unless currentSetting.hideBoardMemberList}}checked{{/unless}}")
  334. label {{_ 'no'}}
  335. li
  336. button.js-save-layout.primary {{_ 'save'}}
  337. template(name='selectAuthenticationMethod')
  338. select#defaultAuthenticationMethod
  339. each authentications
  340. if isSelected value
  341. option(value="{{value}}" selected) {{_ value}}
  342. else
  343. option(value="{{value}}") {{_ value}}
  344. template(name='selectSpinnerName')
  345. select#spinnerName
  346. each spinner in spinners
  347. if isSelected spinner
  348. option(value="{{spinner}}" selected) {{_ spinner}}
  349. else
  350. option(value="{{spinner}}") {{_ spinner}}