create.html.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * The create view file of stage 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 stage
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $percentRow = '';
  12. if(isset($config->setPercent) && $config->setPercent == 1 && (isset($flow->projectModel) && $flow->projectModel != 'ipd' || $config->edition == 'open'))
  13. {
  14. $percentRow = formRow(
  15. formGroup
  16. (
  17. set::width('1/2'),
  18. set::label($lang->stage->percent),
  19. set::labelClass('required'),
  20. inputGroup
  21. (
  22. inputControl
  23. (
  24. input(set::name('percent')),
  25. to::suffix('%'),
  26. set::suffixWidth(20)
  27. )
  28. )
  29. )
  30. );
  31. }
  32. formPanel
  33. (
  34. set::title($lang->stage->create),
  35. set::shadow(false),
  36. set::actions(array('submit')),
  37. formRow
  38. (
  39. formGroup
  40. (
  41. set::width('1/2'),
  42. set::label($lang->stage->name),
  43. set::name('name')
  44. )
  45. ),
  46. $percentRow,
  47. formRow
  48. (
  49. formGroup
  50. (
  51. set::width('1/2'),
  52. set::label($lang->stage->type),
  53. set::name('type'),
  54. set::items(isset($flow->projectModel) && $flow->projectModel == 'ipd' ? $lang->stage->ipdTypeList : $lang->stage->typeList)
  55. )
  56. )
  57. );
  58. /* ====== Render page ====== */
  59. render();