peopleBody.jade 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. template(name="people")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-title.ext-box
  7. .ext-box-left
  8. if loading.get
  9. +spinner
  10. else if orgSetting.get
  11. span
  12. i.fa.fa-sitemap
  13. unless isMiniScreen
  14. | {{_ 'organizations'}}
  15. input#searchOrgInput(placeholder="{{_ 'search'}}")
  16. button#searchOrgButton
  17. i.fa.fa-search
  18. | {{_ 'search'}}
  19. .ext-box-right
  20. span {{#unless isMiniScreen}}{{_ 'org-number'}}{{/unless}} #{orgNumber}
  21. else if teamSetting.get
  22. span
  23. i.fa.fa-users
  24. unless isMiniScreen
  25. | {{_ 'teams'}}
  26. input#searchTeamInput(placeholder="{{_ 'search'}}")
  27. button#searchTeamButton
  28. i.fa.fa-search
  29. | {{_ 'search'}}
  30. .ext-box-right
  31. span {{#unless isMiniScreen}}{{_ 'team-number'}}{{/unless}} #{teamNumber}
  32. else if peopleSetting.get
  33. span
  34. i.fa.fa-user
  35. unless isMiniScreen
  36. | {{_ 'people'}}
  37. input#searchInput(placeholder="{{_ 'search'}}")
  38. button#searchButton
  39. i.fa.fa-search
  40. | {{_ 'search'}}
  41. .divLockedUsersFilter
  42. .flex-container
  43. span.people-filter {{_ 'admin-people-filter-show'}}
  44. select.user-filter#userFilterSelect
  45. option(value="all") {{_ 'admin-people-filter-all'}}
  46. option(value="locked") {{_ 'admin-people-filter-locked'}}
  47. option(value="active") {{_ 'admin-people-filter-active'}}
  48. option(value="inactive") {{_ 'admin-people-filter-inactive'}}
  49. button#unlockAllUsers.unlock-all-btn
  50. i.fa.fa-unlock
  51. | {{_ 'accounts-lockout-unlock-all'}}
  52. .ext-box-right
  53. span {{#unless isMiniScreen}}{{_ 'people-number'}}{{/unless}} #{peopleNumber}
  54. .divAddOrRemoveTeam#divAddOrRemoveTeam
  55. button#addOrRemoveTeam
  56. i.fa.fa-edit
  57. | {{_ 'add'}} / {{_ 'delete'}} {{_ 'teams'}}
  58. else if lockedUsersSetting.get
  59. span
  60. i.fa.fa-lock.text-red
  61. unless isMiniScreen
  62. | {{_ 'accounts-lockout-locked-users'}}
  63. .content-body
  64. .side-menu
  65. ul
  66. li.active
  67. a.js-org-menu(data-id="org-setting")
  68. i.fa.fa-sitemap
  69. | {{_ 'organizations'}}
  70. li
  71. a.js-team-menu(data-id="team-setting")
  72. i.fa.fa-users
  73. | {{_ 'teams'}}
  74. li
  75. a.js-people-menu(data-id="people-setting")
  76. i.fa.fa-user
  77. | {{_ 'people'}}
  78. li
  79. a.js-locked-users-menu(data-id="locked-users-setting")
  80. i.fa.fa-lock.text-red
  81. | {{_ 'accounts-lockout-locked-users'}}
  82. .main-body
  83. if loading.get
  84. +spinner
  85. else if orgSetting.get
  86. +orgGeneral
  87. else if teamSetting.get
  88. +teamGeneral
  89. else if peopleSetting.get
  90. +peopleGeneral
  91. else if lockedUsersSetting.get
  92. +lockedUsersGeneral
  93. template(name="orgGeneral")
  94. table
  95. thead
  96. tr
  97. th {{_ 'displayName'}}
  98. th {{_ 'description'}}
  99. th {{_ 'shortName'}}
  100. th {{_ 'autoAddUsersWithDomainName'}}
  101. th {{_ 'website'}}
  102. th {{_ 'createdAt'}}
  103. th {{_ 'active'}}
  104. th
  105. +newOrgRow
  106. tbody
  107. tr
  108. each org in orgList
  109. +orgRow(orgId=org._id)
  110. template(name="teamGeneral")
  111. table
  112. thead
  113. tr
  114. th {{_ 'displayName'}}
  115. th {{_ 'description'}}
  116. th {{_ 'shortName'}}
  117. th {{_ 'website'}}
  118. th {{_ 'createdAt'}}
  119. th {{_ 'active'}}
  120. th
  121. +newTeamRow
  122. tbody
  123. tr
  124. each team in teamList
  125. +teamRow(teamId=team._id)
  126. template(name="peopleGeneral")
  127. #divAddOrRemoveTeamContainer
  128. +modifyTeamsUsers
  129. table
  130. thead
  131. tr
  132. th
  133. +selectAllUser
  134. th {{_ 'accounts-lockout-status'}}
  135. th {{_ 'admin-people-active-status'}}
  136. th {{_ 'username'}}
  137. th {{_ 'fullname'}}
  138. th {{_ 'initials'}}
  139. th {{_ 'admin'}}
  140. th {{_ 'email'}}
  141. th {{_ 'verified'}}
  142. th {{_ 'createdAt'}}
  143. th {{_ 'active'}}
  144. th {{_ 'authentication-method'}}
  145. th {{_ 'import-usernames'}}
  146. th {{_ 'organizations'}}
  147. th {{_ 'teams'}}
  148. th
  149. +newUserRow
  150. tbody
  151. tr
  152. each user in peopleList
  153. +peopleRow(userId=user._id)
  154. template(name="selectAllUser")
  155. | {{_ 'dueCardsViewChange-choice-all'}}
  156. input.allUserChkBox(type="checkbox", id="chkSelectAll")
  157. template(name="newOrgRow")
  158. a.new-org
  159. i.fa.fa-plus-square
  160. | {{_ 'new'}}
  161. template(name="newTeamRow")
  162. a.new-team
  163. i.fa.fa-plus-square
  164. | {{_ 'new'}}
  165. template(name="newUserRow")
  166. a.new-user
  167. i.fa.fa-plus-square
  168. | {{_ 'new'}}
  169. template(name="orgRow")
  170. tr
  171. if orgData.orgIsActive
  172. td {{ orgData.orgDisplayName }}
  173. else
  174. td <s>{{ orgData.orgDisplayName }}</s>
  175. if orgData.orgIsActive
  176. td {{ orgData.orgDesc }}
  177. else
  178. td <s>{{ orgData.orgDesc }}</s>
  179. if orgData.orgIsActive
  180. td {{ orgData.orgShortName }}
  181. else
  182. td <s>{{ orgData.orgShortName }}</s>
  183. if orgData.orgIsActive
  184. td {{ orgData.orgAutoAddUsersWithDomainName }}
  185. else
  186. td <s>{{ orgData.orgAutoAddUsersWithDomainName }}</s>
  187. if orgData.orgIsActive
  188. td {{ orgData.orgWebsite }}
  189. else
  190. td <s>{{ orgData.orgWebsite }}</s>
  191. if orgData.orgIsActive
  192. td {{ moment orgData.createdAt 'LLL' }}
  193. else
  194. td <s>{{ moment orgData.createdAt 'LLL' }}</s>
  195. td
  196. if orgData.orgIsActive
  197. | {{_ 'yes'}}
  198. else
  199. | {{_ 'no'}}
  200. td
  201. a.edit-org
  202. i.fa.fa-edit
  203. | {{_ 'edit'}}
  204. a.more-settings-org
  205. i.fa.fa-ellipsis-h
  206. template(name="teamRow")
  207. tr
  208. if teamData.teamIsActive
  209. td {{ teamData.teamDisplayName }}
  210. else
  211. td <s>{{ teamData.teamDisplayName }}</s>
  212. if teamData.teamIsActive
  213. td {{ teamData.teamDesc }}
  214. else
  215. td <s>{{ teamData.teamDesc }}</s>
  216. if teamData.teamIsActive
  217. td {{ teamData.teamShortName }}
  218. else
  219. td <s>{{ teamData.teamShortName }}</s>
  220. if teamData.teamIsActive
  221. td {{ teamData.teamWebsite }}
  222. else
  223. td <s>{{ teamData.teamWebsite }}</s>
  224. if teamData.teamIsActive
  225. td {{ moment teamData.createdAt 'LLL' }}
  226. else
  227. td <s>{{ moment teamData.createdAt 'LLL' }}</s>
  228. td
  229. if teamData.teamIsActive
  230. | {{_ 'yes'}}
  231. else
  232. | {{_ 'no'}}
  233. td
  234. a.edit-team
  235. i.fa.fa-edit
  236. | {{_ 'edit'}}
  237. a.more-settings-team
  238. i.fa.fa-ellipsis-h
  239. template(name="peopleRow")
  240. tr
  241. if userData.loginDisabled
  242. td
  243. input.selectUserChkBox(type="checkbox", disabled="disabled", id="{{userData._id}}")
  244. else
  245. td
  246. input.selectUserChkBox(type="checkbox", id="{{userData._id}}")
  247. td.account-status
  248. if isUserLocked
  249. i.fa.fa-lock.text-red.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="true", title="{{_ 'accounts-lockout-click-to-unlock'}}")
  250. else
  251. i.fa.fa-unlock.text-green.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="false", title="{{_ 'accounts-lockout-user-unlocked'}}")
  252. td.account-active-status
  253. if userData.loginDisabled
  254. i.fa.fa-ban.text-red.js-toggle-active-status(data-user-id=userData._id, data-is-active="false", title="{{_ 'admin-people-user-inactive'}}")
  255. else
  256. i.fa.fa-check-circle.text-green.js-toggle-active-status(data-user-id=userData._id, data-is-active="true", title="{{_ 'admin-people-user-active'}}")
  257. if userData.loginDisabled
  258. td.username <s>{{ userData.username }}</s>
  259. else if isUserLocked
  260. td.username {{ userData.username }}
  261. else
  262. td.username {{ userData.username }}
  263. if userData.loginDisabled
  264. td <s>{{ userData.profile.fullname }}</s>
  265. else
  266. td {{ userData.profile.fullname }}
  267. if userData.loginDisabled
  268. td <s>{{ userData.profile.initials }}</s>
  269. else
  270. td {{ userData.profile.initials }}
  271. if userData.loginDisabled
  272. td
  273. if userData.isAdmin
  274. | <s>{{_ 'yes'}}</s>
  275. else
  276. | <s>{{_ 'no'}}</s>
  277. else
  278. td
  279. if userData.isAdmin
  280. | {{_ 'yes'}}
  281. else
  282. | {{_ 'no'}}
  283. if userData.loginDisabled
  284. td <s>{{ userData.emails.[0].address }}</s>
  285. else
  286. td {{ userData.emails.[0].address }}
  287. if userData.loginDisabled
  288. td
  289. if userData.emails.[0].verified
  290. | <s>{{_ 'yes'}}</s>
  291. else
  292. | <s>{{_ 'no'}}</s>
  293. else
  294. td
  295. if userData.emails.[0].verified
  296. | {{_ 'yes'}}
  297. else
  298. | {{_ 'no'}}
  299. if userData.loginDisabled
  300. td <s>{{ moment userData.createdAt 'LLL' }}</s>
  301. else
  302. td {{ moment userData.createdAt 'LLL' }}
  303. td
  304. if userData.loginDisabled
  305. | {{_ 'no'}}
  306. else
  307. | {{_ 'yes'}}
  308. if userData.loginDisabled
  309. td <s>{{_ userData.authenticationMethod }}</s>
  310. else
  311. td {{_ userData.authenticationMethod }}
  312. if userData.loginDisabled
  313. td <s>{{ userData.importUsernamesString }}</s>
  314. else
  315. td {{ userData.importUsernamesString }}
  316. if userData.loginDisabled
  317. td <s>{{ userData.orgsUserBelongs }}</s>
  318. else
  319. td {{ userData.orgsUserBelongs }}
  320. if userData.loginDisabled
  321. td <s>{{ userData.teamsUserBelongs }}</s>
  322. else
  323. td {{ userData.teamsUserBelongs }}
  324. td
  325. a.edit-user
  326. i.fa.fa-edit
  327. | {{_ 'edit'}}
  328. a.more-settings-user
  329. i.fa.fa-ellipsis-h
  330. template(name="editOrgPopup")
  331. form
  332. label.hide.orgId(type="text" value=org._id)
  333. label
  334. | {{_ 'displayName'}}
  335. input.js-orgDisplayName(type="text" value=org.orgDisplayName required)
  336. span.error.hide.orgname-taken
  337. | {{_ 'error-orgname-taken'}}
  338. label
  339. | {{_ 'description'}}
  340. input.js-orgDesc(type="text" value=org.orgDesc required)
  341. label
  342. | {{_ 'shortName'}}
  343. input.js-orgShortName(type="text" value=org.orgShortName required)
  344. label
  345. | {{_ 'autoAddUsersWithDomainName'}}
  346. input.js-orgAutoAddUsersWithDomainName(type="text" value=org.orgAutoAddUsersWithDomainName)
  347. label
  348. | {{_ 'website'}}
  349. input.js-orgWebsite(type="text" value=org.orgWebsite)
  350. label
  351. | {{_ 'active'}}
  352. select.select-active.js-org-isactive
  353. option(value="false") {{_ 'no'}}
  354. option(value="true" selected="{{org.orgIsActive}}") {{_ 'yes'}}
  355. hr
  356. div.buttonsContainer
  357. input.primary.wide(type="submit" value="{{_ 'save'}}")
  358. template(name="editTeamPopup")
  359. form
  360. label.hide.teamId(type="text" value=team._id)
  361. label
  362. | {{_ 'displayName'}}
  363. input.js-teamDisplayName(type="text" value=team.teamDisplayName required)
  364. span.error.hide.teamname-taken
  365. | {{_ 'error-teamname-taken'}}
  366. label
  367. | {{_ 'description'}}
  368. input.js-teamDesc(type="text" value=team.teamDesc required)
  369. label
  370. | {{_ 'shortName'}}
  371. input.js-teamShortName(type="text" value=team.teamShortName required)
  372. label
  373. | {{_ 'website'}}
  374. input.js-teamWebsite(type="text" value=team.teamWebsite)
  375. label
  376. | {{_ 'active'}}
  377. select.select-active.js-team-isactive
  378. option(value="false") {{_ 'no'}}
  379. option(value="true" selected="{{team.teamIsActive}}") {{_ 'yes'}}
  380. hr
  381. div.buttonsContainer
  382. input.primary.wide(type="submit" value="{{_ 'save'}}")
  383. template(name="editUserPopup")
  384. form
  385. label.hide.userId(type="text" value=user._id)
  386. label
  387. | {{_ 'username'}}
  388. span.error.hide.username-taken
  389. | {{_ 'error-username-taken'}}
  390. if isLdap
  391. input.js-profile-username(type="text" value=user.username readonly)
  392. else
  393. input.js-profile-username(type="text" value=user.username required)
  394. label
  395. | {{_ 'fullname'}}
  396. input.js-profile-fullname(type="text" value=user.profile.fullname required)
  397. label
  398. | {{_ 'initials'}}
  399. input.js-profile-initials(type="text" value=user.profile.initials)
  400. label
  401. | {{_ 'admin'}}
  402. select.select-role.js-profile-isadmin
  403. option(value="false") {{_ 'no'}}
  404. option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
  405. label
  406. | {{_ 'email'}}
  407. span.error.hide.email-taken
  408. | {{_ 'error-email-taken'}}
  409. if isLdap
  410. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  411. else
  412. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" required)
  413. label
  414. | {{_ 'import-usernames'}}
  415. input.js-import-usernames(type="text" value=user.importUsernames)
  416. label
  417. | {{_ 'verified'}}
  418. select.select-verified.js-profile-email-verified
  419. option(value="false") {{_ 'no'}}
  420. option(value="true" selected="{{userData.emails.[0].verified}}") {{_ 'yes'}}
  421. label
  422. | {{_ 'active'}}
  423. select.select-active.js-profile-isactive
  424. option(value="false") {{_ 'yes'}}
  425. option(value="true" selected="{{user.loginDisabled}}") {{_ 'no'}}
  426. label
  427. | {{_ 'authentication-type'}}
  428. select.select-authenticationMethod.js-authenticationMethod
  429. each authentications
  430. if isSelected value
  431. option(value="{{value}}" selected) {{_ value}}
  432. else
  433. option(value="{{value}}") {{_ value}}
  434. label
  435. | {{_ 'organizations'}}
  436. i.fa.fa-plus-square#addUserOrg
  437. i.fa.fa-minus-square#removeUserOrg
  438. select.js-orgs#jsOrgs
  439. option(value="-1") {{_ 'organizations'}} :
  440. each value in orgsDatas
  441. option(value="{{value._id}}") {{value.orgDisplayName}}
  442. input#jsUserOrgsInPut.js-userOrgs(type="text" value=user.orgsUserBelongs, disabled)
  443. input#jsUserOrgIdsInPut.js-userOrgIds.hide(type="hidden" value=user.orgIdsUserBelongs)
  444. label
  445. | {{_ 'teams'}}
  446. i.fa.fa-plus-square#addUserTeam
  447. i.fa.fa-minus-square#removeUserTeam
  448. select.js-teams#jsTeams
  449. option(value="-1") {{_ 'teams'}} :
  450. each value in teamsDatas
  451. option(value="{{value._id}}") {{_ value.teamDisplayName}}
  452. input#jsUserTeamsInPut.js-userteams(type="text" value=user.teamsUserBelongs, disabled)
  453. input#jsUserTeamIdsInPut.js-userteamIds.hide(type="hidden" value=user.teamIdsUserBelongs)
  454. hr
  455. label
  456. | {{_ 'password'}}
  457. input.js-profile-password(type="password")
  458. div.buttonsContainer
  459. input.primary.wide(type="submit" value="{{_ 'save'}}")
  460. template(name="newOrgPopup")
  461. form
  462. //label.hide.userId(type="text" value=user._id)
  463. label
  464. | {{_ 'displayName'}}
  465. input.js-orgDisplayName(type="text" value="" required)
  466. label
  467. | {{_ 'description'}}
  468. input.js-orgDesc(type="text" value="" required)
  469. label
  470. | {{_ 'shortName'}}
  471. input.js-orgShortName(type="text" value="" required)
  472. label
  473. | {{_ 'autoAddUsersWithDomainName'}}
  474. input.js-orgAutoAddUsersWithDomainName(type="text" value="")
  475. label
  476. | {{_ 'website'}}
  477. input.js-orgWebsite(type="text" value="" required)
  478. label
  479. | {{_ 'active'}}
  480. select.select-active.js-org-isactive
  481. option(value="false" selected="selected") {{_ 'no'}}
  482. option(value="true") {{_ 'yes'}}
  483. hr
  484. div.buttonsContainer
  485. input.primary.wide(type="submit" value="{{_ 'save'}}")
  486. template(name="newTeamPopup")
  487. form
  488. //label.hide.teamId(type="text" value=team._id)
  489. label
  490. | {{_ 'displayName'}}
  491. input.js-teamDisplayName(type="text" value="" required)
  492. label
  493. | {{_ 'description'}}
  494. input.js-teamDesc(type="text" value="" required)
  495. label
  496. | {{_ 'shortName'}}
  497. input.js-teamShortName(type="text" value="" required)
  498. label
  499. | {{_ 'website'}}
  500. input.js-teamWebsite(type="text" value="")
  501. label
  502. | {{_ 'active'}}
  503. select.select-active.js-team-isactive
  504. option(value="false" selected="selected") {{_ 'no'}}
  505. option(value="true") {{_ 'yes'}}
  506. hr
  507. div.buttonsContainer
  508. input.primary.wide(type="submit" value="{{_ 'save'}}")
  509. template(name="modifyTeamsUsers")
  510. label
  511. | {{_ 'teams'}}
  512. select.js-teamsUser#jsteamsUser
  513. each value in teamsDatas
  514. option(value="{{value._id}}") {{_ value.teamDisplayName}}
  515. hr
  516. label
  517. | {{_ 'r-action'}}
  518. .form-group.flex
  519. input.wekan-form-control#addAction(type="radio" name="action" value="true" checked="checked")
  520. label(for=addAction) {{_ 'add'}}
  521. input.wekan-form-control#deleteAction(type="radio" name="action" value="false")
  522. label(for=deleteAction) {{_ 'delete'}}
  523. div.buttonsContainer
  524. input.primary.wide#addTeamBtn(type="submit" value="{{_ 'save'}}")
  525. input.primary.wide#cancelBtn(type="submit" value="{{_ 'cancel'}}")
  526. template(name="newUserPopup")
  527. form
  528. //label.hide.userId(type="text" value=user._id)
  529. label
  530. | {{_ 'fullname'}}
  531. input.js-profile-fullname(type="text" value="" required)
  532. label
  533. | {{_ 'username'}}
  534. span.error.hide.username-taken
  535. | {{_ 'error-username-taken'}}
  536. //if isLdap
  537. // input.js-profile-username(type="text" value=user.username readonly)
  538. //else
  539. input.js-profile-username(type="text" value="" required)
  540. label
  541. | {{_ 'initials'}}
  542. input.js-profile-initials(type="text" value="")
  543. label
  544. | {{_ 'email'}}
  545. span.error.hide.email-taken
  546. | {{_ 'error-email-taken'}}
  547. //if isLdap
  548. // input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  549. //else
  550. input.js-profile-email(type="email" value="" required)
  551. label
  552. | {{_ 'import-usernames'}}
  553. input.js-import-usernames(type="text" value="")
  554. label
  555. | {{_ 'admin'}}
  556. select.select-role.js-profile-isadmin
  557. option(value="false" selected="selected") {{_ 'no'}}
  558. option(value="true") {{_ 'yes'}}
  559. label
  560. | {{_ 'active'}}
  561. select.select-active.js-profile-isactive
  562. option(value="false" selected="selected") {{_ 'yes'}}
  563. option(value="true") {{_ 'no'}}
  564. label
  565. | {{_ 'authentication-type'}}
  566. select.select-authenticationMethod.js-authenticationMethod
  567. each authentications
  568. if isSelected value
  569. option(value="{{value}}" selected) {{_ value}}
  570. else
  571. option(value="{{value}}") {{_ value}}
  572. label
  573. | {{_ 'organizations'}}
  574. i.fa.fa-plus-square#addUserOrgNewUser
  575. i.fa.fa-minus-square#removeUserOrgNewUser
  576. select.js-orgsNewUser#jsOrgsNewUser
  577. option(value="-1") {{_ 'organizations'}} :
  578. each value in orgsDatas
  579. option(value="{{value._id}}") {{value.orgDisplayName}}
  580. input#jsUserOrgsInPutNewUser.js-userOrgsNewUser(type="text" value=user.orgsUserBelongs, disabled)
  581. input#jsUserOrgIdsInPutNewUser.js-userOrgIdsNewUser.hide(type="text" value=user.orgIdsUserBelongs)
  582. label
  583. | {{_ 'teams'}}
  584. i.fa.fa-plus-square#addUserTeamNewUser
  585. i.fa.fa-minus-square#removeUserTeamNewUser
  586. select.js-teamsNewUser#jsTeamsNewUser
  587. option(value="-1") {{_ 'teams'}} :
  588. each value in teamsDatas
  589. option(value="{{value._id}}") {{_ value.teamDisplayName}}
  590. input#jsUserTeamsInPutNewUser.js-userteamsNewUser(type="text" value=user.teamsUserBelongs, disabled)
  591. input#jsUserTeamIdsInPutNewUser.js-userteamIdsNewUser.hide(type="text" value=user.teamIdsUserBelongs)
  592. hr
  593. label
  594. | {{_ 'password'}}
  595. input.js-profile-password(type="password" required)
  596. div.buttonsContainer
  597. input.primary.wide(type="submit" value="{{_ 'save'}}")
  598. template(name="settingsOrgPopup")
  599. ul.pop-over-list
  600. li
  601. form
  602. label#deleteOrgWarningMessage.hide
  603. | {{_ 'delete-org-warning-message'}}
  604. br
  605. label
  606. | {{_ 'delete-org-confirm-popup'}}
  607. br
  608. label.hide.orgId(type="text" value=org._id)
  609. labeldelete-org-confirm-popup
  610. div.buttonsContainer
  611. input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")
  612. // It's not yet possible to impersonate organization. Only impersonate user,
  613. // because that changes current user ID. What would it mean in practice
  614. // to impersonate organization?
  615. // li
  616. // a.impersonate-org
  617. // i.fa.fa-user
  618. // | {{_ 'impersonate-org'}}
  619. //
  620. //
  621. template(name="settingsTeamPopup")
  622. ul.pop-over-list
  623. li
  624. form
  625. label#deleteTeamWarningMessage.hide
  626. | {{_ 'delete-team-warning-message'}}
  627. br
  628. label
  629. | {{_ 'delete-team-confirm-popup'}}
  630. br
  631. label.hide.teamId(type="text" value=team._id)
  632. div.buttonsContainer
  633. input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")
  634. template(name="settingsUserPopup")
  635. ul.pop-over-list
  636. li
  637. a.impersonate-user
  638. i.fa.fa-user
  639. | {{_ 'impersonate-user'}}
  640. br
  641. hr
  642. li
  643. form
  644. label.hide.userId(type="text" value=user._id)
  645. label
  646. | {{_ 'delete-user-confirm-popup' }}
  647. br
  648. div.buttonsContainer
  649. input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")
  650. // Delete is enabled, but there is still bug of leaving empty user avatars
  651. // to boards: boards members, card members and assignees have
  652. // empty users. So it is better to remove user from all boards before removing user.
  653. // See:
  654. // - wekan/client/components/settings/peopleBody.jade deleteButton
  655. // - wekan/client/components/settings/peopleBody.js deleteButton
  656. // - wekan/client/components/sidebar/sidebar.js Popup.afterConfirm('removeMember'
  657. // that does now remove member from board, card members and assignees correctly,
  658. // but that should be used to remove user from all boards similarly
  659. // - wekan/models/users.js Delete is not enabled
  660. template(name="lockedUsersGeneral")
  661. .locked-users-settings
  662. h3 {{_ 'accounts-lockout-settings'}}
  663. p {{_ 'accounts-lockout-info'}}
  664. h4 {{_ 'accounts-lockout-known-users'}}
  665. .title {{_ 'accounts-lockout-failures-before'}}
  666. .form-group
  667. input.wekan-form-control#known-failures-before-lockout(type="number", min="1", max="10", placeholder="3" value="{{knownFailuresBeforeLockout}}")
  668. .title {{_ 'accounts-lockout-period'}}
  669. .form-group
  670. input.wekan-form-control#known-lockout-period(type="number", min="10", max="600", placeholder="60" value="{{knownLockoutPeriod}}")
  671. .title {{_ 'accounts-lockout-failure-window'}}
  672. .form-group
  673. input.wekan-form-control#known-failure-window(type="number", min="1", max="60", placeholder="15" value="{{knownFailureWindow}}")
  674. h4 {{_ 'accounts-lockout-unknown-users'}}
  675. .title {{_ 'accounts-lockout-failures-before'}}
  676. .form-group
  677. input.wekan-form-control#unknown-failures-before-lockout(type="number", min="1", max="10", placeholder="3" value="{{unknownFailuresBeforeLockout}}")
  678. .title {{_ 'accounts-lockout-period'}}
  679. .form-group
  680. input.wekan-form-control#unknown-lockout-period(type="number", min="10", max="600", placeholder="60" value="{{unknownLockoutPeriod}}")
  681. .title {{_ 'accounts-lockout-failure-window'}}
  682. .form-group
  683. input.wekan-form-control#unknown-failure-window(type="number", min="1", max="60", placeholder="15" value="{{unknownFailureWindow}}")
  684. button.js-lockout-save.primary {{_ 'save'}}