choosedept.html.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * The chooseDept view file of webhook module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Yidong Wang <yidong@easycorp.ltd>
  7. * @package webhook
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('deptTree', $deptTree);
  12. jsVar('webhookType', $webhookType);
  13. jsVar('webhookID', $webhookID);
  14. jsVar('noDeptError', $lang->webhook->error->noDept);
  15. jsVar('requestError', $lang->webhook->error->requestError);
  16. jsVar('feishuUrl', $this->createLink('webhook', 'ajaxGetFeishuDeptList', array('webhookID' => $webhookID)));
  17. panel
  18. (
  19. setClass('m-auto'),
  20. set::style(array('width' => '900px')),
  21. set::title($lang->webhook->chooseDept),
  22. on::click('.save', 'submitSelectedDepts'),
  23. $webhookType == 'feishuuser' ? div
  24. (
  25. setID('notice'),
  26. setClass('alert secondary-pale'),
  27. icon('exclamation-sign'),
  28. $lang->webhook->friendlyTips
  29. ) : null,
  30. div(setID('loadPrompt'), span(setClass('text-gray'), $lang->webhook->loadPrompt)),
  31. h::ul
  32. (
  33. setID('deptList'),
  34. setClass('list-unstyled load-indicator'),
  35. on::init()->call('loadDeptTree')
  36. ),
  37. div
  38. (
  39. setClass('actions mt-3'),
  40. btn(setClass('primary save'), $lang->save),
  41. btn(set::url(createLink('webhook', 'browse')), $lang->goback, setClass('ml-2'))
  42. )
  43. );
  44. render();