* Finish task #46544,46556.
This commit is contained in:
@@ -20,8 +20,8 @@ class gitlabWebhookEntry extends baseEntry
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
$repoID= $this->param('repoID');
|
||||
if(empty($id)) return;
|
||||
$repoID = $this->param('repoID');
|
||||
if(empty($repoID)) return;
|
||||
|
||||
$this->loadModel('repo');
|
||||
|
||||
@@ -845,6 +845,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function createBranchPriv($gitlabID, $projectID, $branch = '')
|
||||
{
|
||||
if($branch) $branch = base64_decode($branch);
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createBranchPriv($gitlabID, $projectID, $branch);
|
||||
@@ -916,6 +917,7 @@ class gitlab extends control
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->branch->confirmDelete , inlink('deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch&confirm=yes")));
|
||||
|
||||
$branch = base64_decode($branch);
|
||||
$reponse = $this->gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
@@ -1044,6 +1046,73 @@ class gitlab extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a gitlab protect tag.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createTagPriv($gitlabID, $projectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createTagPriv($gitlabID, $projectID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseTagPriv', "gitlabID=$gitlabID&projectID=$projectID")));
|
||||
}
|
||||
|
||||
$gitlabTags = $this->gitlab->apiGetTags($gitlabID, $projectID);
|
||||
$protectTags = $this->gitlab->apiGetBranchPrivs($gitlabID, $projectID, '', 'name_asc');
|
||||
$protectNames = array_keys($protectBranches);
|
||||
|
||||
$tags = array();
|
||||
foreach($gitlabTags as $tag)
|
||||
{
|
||||
if(!in_array($tag->name, $protectNames)) $tags[$tag->name] = $tag->name;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->createTagPriv;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->tags = $tags;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a gitlab protect tag.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $tag
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editTagPriv($gitlabID, $projectID, $tag = '')
|
||||
{
|
||||
$tag = base64_decode($tag);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createTagPriv($gitlabID, $projectID, $tag);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseTagPriv', "gitlabID=$gitlabID&projectID=$projectID")));
|
||||
}
|
||||
|
||||
$tagPriv = $this->gitlab->apiGetSingleTagPriv($gitlabID, $projectID, $tag);
|
||||
$tagPriv->createAccessLevel = $this->gitlab->checkAccessLevel($tagPriv->create_access_levels);
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->editTagPriv;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->tagPriv = $tagPriv;
|
||||
$this->view->tag = $tag;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a gitlab protect tag.
|
||||
*
|
||||
@@ -1466,6 +1535,7 @@ class gitlab extends control
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
|
||||
|
||||
$tagName = base64_decode($tagName);
|
||||
$reponse = $this->gitlab->apiDeleteTag($gitlabID, $projectID, $tagName);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
|
||||
+16
-14
@@ -55,7 +55,7 @@ $lang->gitlab->editBranchPriv = 'Edit branch protected';
|
||||
$lang->gitlab->deleteBranchPriv = 'Delete branch protected';
|
||||
$lang->gitlab->createTag = 'Create Tag';
|
||||
$lang->gitlab->deleteTag = 'Delete tag';
|
||||
$lang->gitlab->createTagPriv = 'Add tag protected';
|
||||
$lang->gitlab->createTagPriv = 'Create tag protected';
|
||||
$lang->gitlab->editTagPriv = 'Edit tag protected';
|
||||
$lang->gitlab->deleteTagPriv = 'Delete tag protected';
|
||||
|
||||
@@ -211,16 +211,18 @@ $lang->gitlab->branch->emptyPrivNameError = "Branch cannot be empty.";
|
||||
$lang->gitlab->branch->issetPrivNameError = "The protection branch already exists";
|
||||
|
||||
$lang->gitlab->tag = new stdclass();
|
||||
$lang->gitlab->tag->name = 'Tag name';
|
||||
$lang->gitlab->tag->ref = 'Create from';
|
||||
$lang->gitlab->tag->lastCommitter = 'Last Committer';
|
||||
$lang->gitlab->tag->lastCommittedDate = 'Last Committed Date';
|
||||
$lang->gitlab->tag->placeholderSearch = "Enter branch tag";
|
||||
$lang->gitlab->tag->message = 'Message';
|
||||
$lang->gitlab->tag->emptyNameError = "Name cannot be empty.";
|
||||
$lang->gitlab->tag->emptyRefError = "Create from cannot be empty.";
|
||||
$lang->gitlab->tag->issetNameError = "The tag already exists";
|
||||
$lang->gitlab->tag->confirmDelete = 'Do you want to delete this GitLab tag?';
|
||||
$lang->gitlab->tag->protected = 'Protected';
|
||||
$lang->gitlab->tag->accessLevel = 'Allow creation';
|
||||
$lang->gitlab->tag->protectConfirmDel = 'Do you want to delete this GitLab tag protected?';
|
||||
$lang->gitlab->tag->name = 'Tag name';
|
||||
$lang->gitlab->tag->ref = 'Create from';
|
||||
$lang->gitlab->tag->lastCommitter = 'Last Committer';
|
||||
$lang->gitlab->tag->lastCommittedDate = 'Last Committed Date';
|
||||
$lang->gitlab->tag->placeholderSearch = "Enter branch tag";
|
||||
$lang->gitlab->tag->message = 'Message';
|
||||
$lang->gitlab->tag->emptyNameError = "Name cannot be empty.";
|
||||
$lang->gitlab->tag->emptyRefError = "Create from cannot be empty.";
|
||||
$lang->gitlab->tag->issetNameError = "The tag already exists";
|
||||
$lang->gitlab->tag->confirmDelete = 'Do you want to delete this GitLab tag?';
|
||||
$lang->gitlab->tag->protected = 'Protected';
|
||||
$lang->gitlab->tag->accessLevel = 'Allow creation';
|
||||
$lang->gitlab->tag->protectConfirmDel = 'Do you want to delete this GitLab tag protected?';
|
||||
$lang->gitlab->tag->emptyPrivNameError = 'Tag cannot be empty.';
|
||||
$lang->gitlab->tag->issetPrivNameError = 'The protection tag already exists.';
|
||||
|
||||
@@ -55,7 +55,7 @@ $lang->gitlab->editBranchPriv = '编辑分支保护';
|
||||
$lang->gitlab->deleteBranchPriv = '删除分支保护';
|
||||
$lang->gitlab->createTag = '创建标签';
|
||||
$lang->gitlab->deleteTag = '删除标签';
|
||||
$lang->gitlab->createTagPriv = '添加标签保护';
|
||||
$lang->gitlab->createTagPriv = '创建标签保护';
|
||||
$lang->gitlab->editTagPriv = '编辑标签保护';
|
||||
$lang->gitlab->deleteTagPriv = '删除标签保护';
|
||||
|
||||
@@ -211,16 +211,18 @@ $lang->gitlab->branch->emptyPrivNameError = "分支不能为空";
|
||||
$lang->gitlab->branch->issetPrivNameError = "已存在该保护分支";
|
||||
|
||||
$lang->gitlab->tag = new stdclass();
|
||||
$lang->gitlab->tag->name = '标签名';
|
||||
$lang->gitlab->tag->ref = '创建自';
|
||||
$lang->gitlab->tag->lastCommitter = '最后提交';
|
||||
$lang->gitlab->tag->lastCommittedDate = '最后修改时间';
|
||||
$lang->gitlab->tag->placeholderSearch = "请输入标签名称";
|
||||
$lang->gitlab->tag->message = '信息';
|
||||
$lang->gitlab->tag->emptyNameError = "标签名不能为空";
|
||||
$lang->gitlab->tag->emptyRefError = "创建自不能为空";
|
||||
$lang->gitlab->tag->issetNameError = "已存在该标签";
|
||||
$lang->gitlab->tag->confirmDelete = '确认删除该GitLab标签吗?';
|
||||
$lang->gitlab->tag->protected = '受保护';
|
||||
$lang->gitlab->tag->accessLevel = '允许创建';
|
||||
$lang->gitlab->tag->protectConfirmDel = '确认删除该GitLab标签保护吗?';
|
||||
$lang->gitlab->tag->name = '标签名';
|
||||
$lang->gitlab->tag->ref = '创建自';
|
||||
$lang->gitlab->tag->lastCommitter = '最后提交';
|
||||
$lang->gitlab->tag->lastCommittedDate = '最后修改时间';
|
||||
$lang->gitlab->tag->placeholderSearch = "请输入标签名称";
|
||||
$lang->gitlab->tag->message = '信息';
|
||||
$lang->gitlab->tag->emptyNameError = "标签名不能为空";
|
||||
$lang->gitlab->tag->emptyRefError = "创建自不能为空";
|
||||
$lang->gitlab->tag->issetNameError = "已存在该标签";
|
||||
$lang->gitlab->tag->confirmDelete = '确认删除该GitLab标签吗?';
|
||||
$lang->gitlab->tag->protected = '受保护';
|
||||
$lang->gitlab->tag->accessLevel = '允许创建';
|
||||
$lang->gitlab->tag->protectConfirmDel = '确认删除该GitLab标签保护吗?';
|
||||
$lang->gitlab->tag->emptyPrivNameError = "标签不能为空";
|
||||
$lang->gitlab->tag->issetPrivNameError = "已存在该保护标签";
|
||||
|
||||
@@ -54,6 +54,8 @@ $lang->gitlab->editBranchPriv = '編輯分支保護';
|
||||
$lang->gitlab->deleteBranchPriv = '刪除分支保護';
|
||||
$lang->gitlab->createTag = '創建標籤';
|
||||
$lang->gitlab->deleteTag = '刪除標籤';
|
||||
$lang->gitlab->createTagPriv = '創建標簽保護';
|
||||
$lang->gitlab->editTagPriv = '編輯標簽保護';
|
||||
|
||||
$lang->gitlab->id = 'ID';
|
||||
$lang->gitlab->name = "{$lang->gitlab->common}名稱";
|
||||
@@ -207,14 +209,17 @@ $lang->gitlab->branch->emptyPrivNameError = "分支不能為空";
|
||||
$lang->gitlab->branch->issetPrivNameError = "已存在該保護分支";
|
||||
|
||||
$lang->gitlab->tag = new stdclass();
|
||||
$lang->gitlab->tag->name = '標籤名';
|
||||
$lang->gitlab->tag->ref = '創建自';
|
||||
$lang->gitlab->tag->lastCommitter = '最後提交';
|
||||
$lang->gitlab->tag->lastCommittedDate = '最後修改時間';
|
||||
$lang->gitlab->tag->placeholderSearch = "請輸入標籤名稱";
|
||||
$lang->gitlab->tag->message = '信息';
|
||||
$lang->gitlab->tag->emptyNameError = "標籤名不能為空";
|
||||
$lang->gitlab->tag->emptyRefError = "創建自不能為空";
|
||||
$lang->gitlab->tag->issetNameError = "已存在該標籤";
|
||||
$lang->gitlab->tag->confirmDelete = '確認刪除該GitLab標籤嗎?';
|
||||
$lang->gitlab->tag->protected = '受保護';
|
||||
$lang->gitlab->tag->name = '標籤名';
|
||||
$lang->gitlab->tag->ref = '創建自';
|
||||
$lang->gitlab->tag->lastCommitter = '最後提交';
|
||||
$lang->gitlab->tag->lastCommittedDate = '最後修改時間';
|
||||
$lang->gitlab->tag->placeholderSearch = "請輸入標籤名稱";
|
||||
$lang->gitlab->tag->message = '信息';
|
||||
$lang->gitlab->tag->emptyNameError = "標籤名不能為空";
|
||||
$lang->gitlab->tag->emptyRefError = "創建自不能為空";
|
||||
$lang->gitlab->tag->issetNameError = "已存在該標籤";
|
||||
$lang->gitlab->tag->confirmDelete = '確認刪除該GitLab標籤嗎?';
|
||||
$lang->gitlab->tag->protected = '受保護';
|
||||
$lang->gitlab->tag->accessLevel = '允許創建';
|
||||
$lang->gitlab->tag->emptyPrivNameError = '標簽不能爲空';
|
||||
$lang->gitlab->tag->issetPrivNameError = '已存在該保護標簽';
|
||||
|
||||
+74
-3
@@ -2403,10 +2403,18 @@ class gitlabModel extends model
|
||||
{
|
||||
foreach($response->message as $field => $fieldErrors)
|
||||
{
|
||||
foreach($fieldErrors as $error)
|
||||
if(is_string($fieldErrors))
|
||||
{
|
||||
$errorKey = array_search($error, $this->lang->gitlab->apiError);
|
||||
if($error) dao::$errors[$field][] = $errorKey === false ? $error : zget($this->lang->gitlab->errorLang, $errorKey);
|
||||
$errorKey = array_search($fieldErrors, $this->lang->gitlab->apiError);
|
||||
if($fieldErrors) dao::$errors[$field][] = $errorKey === false ? $fieldErrors : zget($this->lang->gitlab->errorLang, $errorKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($fieldErrors as $error)
|
||||
{
|
||||
$errorKey = array_search($error, $this->lang->gitlab->apiError);
|
||||
if($error) dao::$errors[$field][] = $errorKey === false ? $error : zget($this->lang->gitlab->errorLang, $errorKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2542,6 +2550,69 @@ class gitlabModel extends model
|
||||
return json_decode(commonModel::http($url, array(), $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create gitlab protect tag.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $tag
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createTagPriv($gitlabID, $projectID, $tag = '')
|
||||
{
|
||||
$priv = fixer::input('post')->get();
|
||||
if(empty($priv->name)) dao::$errors['name'][] = $this->lang->gitlab->branch->emptyPrivNameError;
|
||||
$singleTag = $this->apiGetSingleTagPriv($gitlabID, $projectID, $priv->name);
|
||||
if(empty($tag) && !empty($singleTag->id)) dao::$errors['name'][] = $this->lang->gitlab->tag->issetPrivNameError;
|
||||
if(dao::isError()) return false;
|
||||
if(!empty($tag) && !empty($singleTag->name)) $this->apiDeleteTagPriv($gitlabID, $projectID, $tag);
|
||||
|
||||
$response = $this->apiCreateTagPriv($gitlabID, $projectID, $priv);
|
||||
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$action = empty($tag) ? 'created' : 'edited';
|
||||
$this->loadModel('action')->create('gitlabtagpriv', $response->id, $action, '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single protct tag by API.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $tag
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiGetSingleTagPriv($gitlabID, $projectID, $tag)
|
||||
{
|
||||
if(empty($gitlabID)) return false;
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/protected_tags/$tag");
|
||||
return json_decode(commonModel::http($url));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitab protect tag by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param object $priv
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiCreateTagPriv($gitlabID, $projectID, $priv)
|
||||
{
|
||||
if(empty($gitlabID)) return false;
|
||||
if(empty($priv->name)) return false;
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/" . $projectID . '/protected_tags');
|
||||
return json_decode(commonModel::http($url, $priv));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check access level.
|
||||
*
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
<td class='text' title="<?php echo $levelLang[$branch->push_access_level];?>"><?php echo $levelLang[$branch->push_access_level];?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch->name", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch->name"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
|
||||
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=" . urlencode(base64_encode($branch->name)), "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=" . urlencode(base64_encode($branch->name))), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
$isDisabled = $gitlabTag->protected ? 'disabled' : '';
|
||||
common::printLink('gitlab', 'deleteTag', "gitlabID=$gitlabID&projectID={$projectID}&tag_name={$gitlabTag->name}", "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTag}' class='btn btn-primary' target='hiddenwin' $isDisabled");
|
||||
common::printLink('gitlab', 'deleteTag', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=" . urlencode(base64_encode($gitlabTag->name)), "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTag}' class='btn btn-primary' target='hiddenwin' $isDisabled");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<td class='text'><?php echo zget($lang->gitlab->branch->branchCreationLevelList, $gitlabTag->accessLevel);?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
common::printLink('gitlab', 'editTagPriv', "gitlabID=$gitlabID&projectID=$projectID&tag_name={$gitlabTag->name}", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'editTagPriv', "gitlabID=$gitlabID&projectID=$projectID&tag_name=" . urlencode(base64_encode($gitlabTag->name)), "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'deleteTagPriv', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=" . urlencode(base64_encode($gitlabTag->name)), "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTagPriv}' class='btn btn-primary' target='hiddenwin' onclick='if(confirm(\"{$lang->gitlab->tag->protectConfirmDel}\")==false) return false;'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of protect tag of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yuchun Li <liyuchun@easycorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->gitlab->createTagPriv;?></h2>
|
||||
</div>
|
||||
<form id='branchForm' method='post' class='form-ajax' enctype="multipart/form-data">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->tag->name;?></th>
|
||||
<td><?php echo html::select('name', $tags, '', "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->tag->accessLevel;?></th>
|
||||
<td><?php echo html::select('create_access_level', $lang->gitlab->branch->branchCreationLevelList, '40', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('browseTagPriv', "gitlabID=$gitlabID&projectID=$projectID"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view file of protect tag of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yuchun Li <liyuchun@easycorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->gitlab->editTagPriv;?></h2>
|
||||
</div>
|
||||
<form id='branchForm' method='post' class='form-ajax' enctype="multipart/form-data">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->tag->name;?></th>
|
||||
<td><?php echo html::input('tagName', $tag, "class='form-control' disabled");?></td>
|
||||
<td></td>
|
||||
<?php echo html::hidden('name', $tag);?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->tag->accessLevel;?></th>
|
||||
<td><?php echo html::select('create_access_level', $lang->gitlab->branch->branchCreationLevelList, $tagPriv->createAccessLevel, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('browseTagPriv', "gitlabID=$gitlabID&projectID=$projectID"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user