settingBody.jade 7.5 KB

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