settingBody.jade 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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.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.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.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.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.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.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.form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
  95. span {{_ 'yes'}}
  96. input.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.form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
  103. span {{_ 'yes'}}
  104. input.form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
  105. span {{_ 'no'}}
  106. li
  107. button.js-accounts-save.primary {{_ 'save'}}
  108. template(name='announcementSettings')
  109. ul#announcement-setting.setting-detail
  110. li
  111. a.flex.js-toggle-activemessage
  112. .materialCheckBox(class="{{#if currentSetting.enabled}}is-checked{{/if}}")
  113. span {{_ 'admin-announcement-active'}}
  114. li
  115. .admin-announcement(class="{{#if currentSetting.enabled}}{{else}}hide{{/if}}")
  116. ul
  117. li
  118. .title {{_ 'admin-announcement-title'}}
  119. textarea#admin-announcement.form-control= currentSetting.body
  120. li
  121. button.js-announcement-save.primary {{_ 'save'}}
  122. template(name='layoutSettings')
  123. ul#layout-setting.setting-detail
  124. //li.layout-form
  125. .title {{_ 'hide-logo'}}
  126. .form-group.flex
  127. input.form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
  128. span {{_ 'yes'}}
  129. input.form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
  130. span {{_ 'no'}}
  131. li.layout-form
  132. .title {{_ 'display-authentication-method'}}
  133. .form-group.flex
  134. input.form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
  135. span {{_ 'yes'}}
  136. input.form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
  137. span {{_ 'no'}}
  138. li.layout-form
  139. .title {{_ 'default-authentication-method'}}
  140. +selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
  141. li.layout-form
  142. .title {{_ 'custom-product-name'}}
  143. .form-group
  144. input.form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}")
  145. li.layout-form
  146. .title {{_ 'add-custom-html-after-body-start'}}
  147. textarea#customHTMLafterBodyStart.form-control= currentSetting.customHTMLafterBodyStart
  148. li.layout-form
  149. .title {{_ 'add-custom-html-before-body-end'}}
  150. textarea#customHTMLbeforeBodyEnd.form-control= currentSetting.customHTMLbeforeBodyEnd
  151. li
  152. button.js-save-layout.primary {{_ 'save'}}
  153. template(name='selectAuthenticationMethod')
  154. select#defaultAuthenticationMethod
  155. each authentications
  156. if isSelected value
  157. option(value="{{value}}" selected) {{_ value}}
  158. else
  159. option(value="{{value}}") {{_ value}}