znt/module/convert/ui/importjiranotice.html.php

135 lines
4 KiB
PHP

<?php
declare(strict_types=1);
/**
* The import notice view file of convert module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Gang Liu <liugang@easycorp.ltd>
* @package convert
* @link https://www.zentao.net
*/
namespace zin;
$labelWidth = $method == 'db' ? '80px' : '120px';
$isSetLabelWidth = $app->getClientLang() == 'en' ? null : set::labelWidth($labelWidth);
$title = $lang->convert->jira->importFromDB;
if($method == 'file')
{
$title = $lang->convert->jira->importFromFile;
}
elseif($method == 'api')
{
$title = $lang->convert->jira->importFromAPI;
}
formPanel
(
set::title($title),
set::headingClass('justify-start'),
set::bodyClass('px-0'),
set::submitBtnText($lang->convert->jira->next),
set::backUrl(inlink('index')),
to::heading
(
span
(
setClass('flex items-center text-gray'),
icon('exclamation text-warning mr-1'),
span($lang->convert->jira->importNotice)
)
),
formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('1.'),
$isSetLabelWidth,
$lang->convert->jira->importSteps[$method][1]
),
formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('2.'),
$isSetLabelWidth,
$lang->convert->jira->importSteps[$method][2]
),
formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('3.'),
$isSetLabelWidth,
$method == 'db' ? $lang->convert->jira->importSteps[$method][3] : html(sprintf($lang->convert->jira->importSteps[$method][3], $app->getTmpRoot() . 'jirafile'))
),
formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('4.'),
$isSetLabelWidth,
html(sprintf($lang->convert->jira->importSteps[$method][4], $app->getTmpRoot()))
),
$method != 'api' ? formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('5.'),
$isSetLabelWidth,
$lang->convert->jira->importSteps[$method][5]
) : null,
$method == 'file' ? formGroup
(
setStyle(array('align-items' => 'center', 'white-space' => 'break-spaces')),
set::label('6.'),
$isSetLabelWidth,
$lang->convert->jira->importSteps[$method][6]
) : null,
$method == 'db' ? formGroup
(
set::label($lang->convert->jira->database),
$isSetLabelWidth,
set::required(true),
input
(
setClass('w-72'),
set::name('dbName'),
set::placeholder($lang->convert->jira->dbNameNotice)
)
) : null,
in_array($method, ['file', 'api']) ? formGroup
(
set::label($lang->convert->jira->domain),
set::required($method == 'api'),
$isSetLabelWidth,
input
(
setClass('w-72'),
set::name('jiraDomain'),
set::value(zget($jiraApi, 'domain', ''))
)
) : null,
in_array($method, ['file', 'api']) ? formGroup
(
set::label($lang->convert->jira->admin),
set::required($method == 'api'),
$isSetLabelWidth,
input
(
setClass('w-72'),
set::name('jiraAdmin'),
set::value(zget($jiraApi, 'admin', ''))
)
) : null,
in_array($method, ['file', 'api']) ? formGroup
(
set::label($method == 'api' ? $lang->convert->jira->apiToken : $lang->convert->jira->token),
set::required($method == 'api'),
$isSetLabelWidth,
input
(
setClass('w-72'),
set::name('jiraToken'),
set::value(zget($jiraApi, 'token', ''))
)
) : null,
);
render();