importjiranotice.html.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. /**
  3. * The import notice view file of convert 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 Gang Liu <liugang@easycorp.ltd>
  7. * @package convert
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $labelWidth = $method == 'db' ? '80px' : '120px';
  12. $isSetLabelWidth = $app->getClientLang() == 'en' ? null : set::labelWidth($labelWidth);
  13. $title = $lang->convert->jira->importFromDB;
  14. if($method == 'file')
  15. {
  16. $title = $lang->convert->jira->importFromFile;
  17. }
  18. elseif($method == 'api')
  19. {
  20. $title = $lang->convert->jira->importFromAPI;
  21. }
  22. formPanel(set::title($title), set::headingClass('justify-start'), set::bodyClass('px-0'), set::submitBtnText($lang->convert->jira->next), set::backUrl(inlink('index')), to::heading
  23. (
  24. span
  25. (
  26. setClass('flex items-center text-gray'),
  27. icon('exclamation text-warning mr-1'),
  28. span($lang->convert->jira->importNotice)
  29. )
  30. ), formGroup
  31. (
  32. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  33. set::label('1.'),
  34. $isSetLabelWidth,
  35. $lang->convert->jira->importSteps[$method][1]
  36. ), formGroup
  37. (
  38. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  39. set::label('2.'),
  40. $isSetLabelWidth,
  41. $lang->convert->jira->importSteps[$method][2]
  42. ), formGroup
  43. (
  44. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  45. set::label('3.'),
  46. $isSetLabelWidth,
  47. $method == 'db' ? $lang->convert->jira->importSteps[$method][3] : html(sprintf($lang->convert->jira->importSteps[$method][3], $app->getTmpRoot() . 'jirafile'))
  48. ), formGroup
  49. (
  50. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  51. set::label('4.'),
  52. $isSetLabelWidth,
  53. html(sprintf($lang->convert->jira->importSteps[$method][4], $app->getTmpRoot()))
  54. ), $method != 'api' ? formGroup
  55. (
  56. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  57. set::label('5.'),
  58. $isSetLabelWidth,
  59. $lang->convert->jira->importSteps[$method][5]
  60. ) : null, $method == 'file' ? formGroup
  61. (
  62. setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
  63. set::label('6.'),
  64. $isSetLabelWidth,
  65. $lang->convert->jira->importSteps[$method][6]
  66. ) : null, $method == 'db' ? formGroup
  67. (
  68. set::label($lang->convert->jira->database),
  69. $isSetLabelWidth,
  70. set::required(true),
  71. input
  72. (
  73. setClass('w-72'),
  74. set::name('dbName'),
  75. set::placeholder($lang->convert->jira->dbNameNotice)
  76. )
  77. ) : null, in_array($method, ['file', 'api']) ? formGroup
  78. (
  79. set::label($lang->convert->jira->domain),
  80. set::required($method == 'api'),
  81. $isSetLabelWidth,
  82. input
  83. (
  84. setClass('w-72'),
  85. set::name('jiraDomain'),
  86. set::value(zget($jiraApi, 'domain', ''))
  87. )
  88. ) : null, in_array($method, ['file', 'api']) ? formGroup
  89. (
  90. set::label($lang->convert->jira->admin),
  91. set::required($method == 'api'),
  92. $isSetLabelWidth,
  93. input
  94. (
  95. setClass('w-72'),
  96. set::name('jiraAdmin'),
  97. set::value(zget($jiraApi, 'admin', ''))
  98. )
  99. ) : null, in_array($method, ['file', 'api']) ? formGroup
  100. (
  101. set::label($method == 'api' ? $lang->convert->jira->apiToken : $lang->convert->jira->token),
  102. set::required($method == 'api'),
  103. $isSetLabelWidth,
  104. input
  105. (
  106. setClass('w-72'),
  107. set::name('jiraToken'),
  108. set::value(zget($jiraApi, 'token', ''))
  109. )
  110. ) : null);
  111. render();