binduser.html.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * The bind user file of gitlab module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yanyi Cao<caoyanyi@easycorp.ltd>
  8. * @package gitlab
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. /* zin: Define the set::module('compile') feature bar on main menu. */
  13. featureBar
  14. (
  15. to::leading(array(backBtn(set::icon('back'), set::className('secondary'), $lang->goback))),
  16. set::current($type),
  17. set::link($this->createLink('gitlab', 'binduser', "gitlabID=$gitlabID&type={key}"))
  18. );
  19. /* zin: Define the toolbar on main menu. */
  20. toolbar();
  21. jsVar('zentaoUsers', $zentaoUsers);
  22. jsVar('gitlabID', $gitlabID);
  23. jsVar('type', $type);
  24. $config->gitlab->dtable->bindUser->fieldList['gitlabEmail']['onRenderCell'] = jsRaw('renderGitlabUser');
  25. $config->gitlab->dtable->bindUser->fieldList['zentaoUsers']['controlItems'] = $userPairs;
  26. form
  27. (
  28. setID('bindForm'),
  29. setClass('mb-4 h-full'),
  30. set::action(createLink('gitlab', 'bindUser', "gitlabID={$gitlabID}")),
  31. set::actions(array()),
  32. on::change('input[name^="zentaoUsers"]', 'setUserEmail'),
  33. dtable
  34. (
  35. set::cols($config->gitlab->dtable->bindUser->fieldList),
  36. set::data($userList),
  37. set::plugins(array('form')),
  38. set::rowHeight(50),
  39. set::showToolbarOnChecked(false),
  40. set::footer(array('toolbar')),
  41. set::rowKey('gitlabID'),
  42. set::footToolbar(array(
  43. 'className' => 'w-full form-actions form-group no-label',
  44. 'items' => array(
  45. array(
  46. 'text' => $lang->save,
  47. 'btnType' => 'primary',
  48. 'onClick' => jsRaw("bindUser")
  49. ),
  50. array(
  51. 'text' => $lang->goback,
  52. 'btnType' => 'info',
  53. 'onClick' => jsRaw('() => {goBack()}')
  54. )
  55. )
  56. ))
  57. )
  58. );