settingBody.jade 9.8 KB

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