settingBody.jade 7.7 KB

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