hours.html.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * The hours view file of custom 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 Shujie Tian<tianshujie@easycorp.ltd>
  7. * @package custom
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. include 'sidebar.html.php';
  12. div
  13. (
  14. setClass('flex'),
  15. $sidebarMenu,
  16. formPanel
  17. (
  18. set::actions(array('submit')),
  19. set::actionsClass('w-1/3'),
  20. setClass('flex-auto ml-4'),
  21. span
  22. (
  23. setClass('text-md font-bold'),
  24. $type == 'hours' ? $lang->custom->setHours : $lang->custom->setWeekend
  25. ),
  26. formGroup
  27. (
  28. setClass($type == 'hours' ? '' : 'hidden'),
  29. set::label($lang->custom->workingHours),
  30. set::width('1/3'),
  31. set::name('defaultWorkhours'),
  32. set::value($workhours)
  33. ),
  34. formGroup
  35. (
  36. setClass($type == 'weekend' ? '' : 'hidden'),
  37. set::label($lang->custom->weekendRole),
  38. set::width('1/3'),
  39. radioList
  40. (
  41. set::name('weekend'),
  42. set::items($lang->custom->weekendList),
  43. set::value($weekend),
  44. set::inline(true)
  45. )
  46. ),
  47. formGroup
  48. (
  49. setClass($weekend == 1 && $type == 'weekend'? '' : 'hidden'),
  50. setID('restDayBox'),
  51. set::width('1/3'),
  52. set::label($lang->custom->setWeekend),
  53. picker
  54. (
  55. set::name('restDay'),
  56. set::items($lang->custom->restDayList),
  57. set::value($restDay),
  58. set::required(true)
  59. )
  60. ),
  61. formHidden('type', $type)
  62. )
  63. );
  64. /* ====== Render page ====== */
  65. render();