- [misc] Remove unused view files.
This commit is contained in:
@@ -1,88 +0,0 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-900px'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->bind?></h2>
|
||||
</div>
|
||||
<form class='main-form' id='bindForm' target='hiddenwin' method='post' data-ride='table'>
|
||||
<table id='bindList' class='table table-fixed table-bordered active-disabled table-hover'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='text-left' colspan="2"><?php echo $lang->webhook->zentaoUser?></th>
|
||||
<th class='text-left' colspan="2">
|
||||
<?php
|
||||
if($webhook->type == 'dinguser') echo $lang->webhook->dingUserid;
|
||||
if($webhook->type == 'wechatuser') echo $lang->webhook->wechatUserid;
|
||||
if($webhook->type == 'feishuuser') echo $lang->webhook->feishuUserid;
|
||||
?>
|
||||
</th>
|
||||
<th class='c-action'><?php echo $lang->actions;?></th>
|
||||
<th class='c-bind'>
|
||||
<?php
|
||||
if($webhook->type == 'dinguser') echo $lang->webhook->dingBindStatus;
|
||||
if($webhook->type == 'wechatuser') echo $lang->webhook->wechatBindStatus;
|
||||
if($webhook->type == 'feishuuser') echo $lang->webhook->feishuBindStatus;
|
||||
?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $inputVars = 0;?>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr>
|
||||
<td colspan="2"><?php echo $user->account;?> <span class="label label-badge label-info label-outline"><?php echo $user->realname;?></span></td>
|
||||
<?php
|
||||
$userid = '';
|
||||
$bindStatus = 0;
|
||||
if(isset($bindedUsers[$user->account]))
|
||||
{
|
||||
$userid = $bindedUsers[$user->account];
|
||||
$bindStatus = 1;
|
||||
}
|
||||
elseif(isset($oauthUsers[$user->realname]))
|
||||
{
|
||||
$userid = $oauthUsers[$user->realname];
|
||||
}
|
||||
?>
|
||||
<td colspan="2">
|
||||
<?php echo '<span class="label label-badge label-primary label-outline">' . zget($useridPairs, $userid) . '</span>';?>
|
||||
<?php echo html::input("userid[{$user->account}]", $userid, 'class="form-control hidden"');?>
|
||||
</td>
|
||||
<td class='text-center c-actions'><?php echo '<button class="btn bind" type="button" data-value="userid[' . $user->account . ']"><i class="icon-common-edit icon-edit"></i></button>';?></td>
|
||||
<td class='text-center'><?php echo zget($lang->webhook->dingBindStatusList, $bindStatus, '');?></td>
|
||||
</tr>
|
||||
<?php $inputVars += 1;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($users):?>
|
||||
<div class='table-footer'>
|
||||
<div class='text'>
|
||||
<?php echo html::submitButton($lang->save, '', 'btn btn-primary');?>
|
||||
<?php echo html::a($this->createLink('webhook', 'browse'), $lang->goback, '', "class='btn'");?>
|
||||
<?php if($selectedDepts) echo html::a($this->createLink('webhook', 'chooseDept', "id={$webhook->id}"), $lang->webhook->chooseDeptAgain, '', "class='btn'");?>
|
||||
</div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
<div class="text-hide" id="triggerTitle"><?php echo $lang->webhook->bind;?></div>
|
||||
<div class="content" id="userList">
|
||||
<?php echo html::select("userid", $useridPairs, 0, 'class="form-control" id="userSelect"');?>
|
||||
<div class='table-footer'><?php echo html::commonButton($lang->save, 'onclick = "confirmChanges();"', 'btn btn-primary');?></div>
|
||||
<script>
|
||||
$("#userSelect").chosen();
|
||||
$('.chosen-container').eq(1).remove();
|
||||
</script>
|
||||
</div>
|
||||
<div id="saveInput"></div>
|
||||
</div>
|
||||
<script>
|
||||
<?php if(common::judgeSuhosinSetting($inputVars)):?>
|
||||
$(function()
|
||||
{
|
||||
$('.table-footer').before("<div class='alert alert-info'><?php echo extension_loaded('suhosin') ? trim(sprintf($lang->suhosinInfo, $inputVars)) : trim(sprintf($lang->maxVarsInfo, $inputVars));?></div>")
|
||||
});
|
||||
<?php endif;?>
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of webhook module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package webhook
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->webhook->confirmDelete);?>
|
||||
<div id='mainContent'>
|
||||
<form class='main-table' id='ajaxForm' method='post' data-ride='table'>
|
||||
<table id='webhookList' class='table has-sort-head table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='c-type'><?php common::printOrderLink('type', $orderBy, $vars, $lang->webhook->type);?></th>
|
||||
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->webhook->name);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->webhook->url);?></th>
|
||||
<th class='c-actions-4'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($webhooks as $id => $webhook):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td class='text'><?php echo zget($lang->webhook->typeList, $webhook->type);?></td>
|
||||
<td class='text' title='<?php echo $webhook->name;?>'><?php echo $webhook->name;?></td>
|
||||
<td class='text' title='<?php echo $webhook->url;?>'><?php echo $webhook->url;?></td>
|
||||
<td class='c-actions text-right'>
|
||||
<?php
|
||||
if($webhook->type == 'dinguser' or $webhook->type == 'feishuuser') common::printIcon('webhook', 'chooseDept', "webhookID=$id", '', 'list', 'link');
|
||||
if($webhook->type == 'wechatuser') common::printIcon('webhook', 'bind', "webhookID=$id", '', 'list', 'link');
|
||||
common::printIcon('webhook', 'log', "webhookID=$id", '', 'list', 'file-text');
|
||||
common::printIcon('webhook', 'edit', "webhookID=$id", '', 'list');
|
||||
if(common::hasPriv('webhook', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('webhook', 'delete', "webhookID=$id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"webhookList\", confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->webhook->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($webhooks):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,230 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The choose dept view file of webhook module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package webhook
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/ztree.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->chooseDept?></h2>
|
||||
</div>
|
||||
<?php if($webhookType == 'feishuuser'):?>
|
||||
<div id="notice" class="alert alert-info">
|
||||
<div class="content"><i class="icon-exclamation-sign"></i> <?php echo $lang->webhook->friendlyTips;?></div>
|
||||
</div>
|
||||
<div id='loadPrompt' class="table-empty-tip"><p><span class="text-muted"><?php echo $lang->webhook->loadPrompt;?></span></p></div>
|
||||
<?php endif;?>
|
||||
<ul id='deptList' class="ztree"></ul>
|
||||
<div class='actions'>
|
||||
<?php echo html::commonButton($lang->save, '', 'btn btn-primary save');?>
|
||||
<?php echo html::a($this->createLink('webhook', 'browse'), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('deptTree', $deptTree);?>
|
||||
<?php js::set('webhookType', $webhookType);?>
|
||||
<?php js::set('webhookID', $webhookID);?>
|
||||
<?php js::set('requestError', $lang->webhook->error->requestError);?>
|
||||
<?php js::set('feishuUrl', $this->createLink('webhook', 'ajaxGetFeishuDeptList', array('webhookID' => $webhookID)));?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if(webhookType == 'feishuuser')
|
||||
{
|
||||
var setting =
|
||||
{
|
||||
view:
|
||||
{
|
||||
showIcon: false,
|
||||
dblClickExpand: false,
|
||||
},
|
||||
check:
|
||||
{
|
||||
enable: true,
|
||||
chkStyle: "checkbox",
|
||||
chkboxType: {"Y" : "ps", "N" : "ps"}
|
||||
},
|
||||
data:
|
||||
{
|
||||
simpleData: {enable: true}
|
||||
},
|
||||
async:
|
||||
{
|
||||
enable: true,
|
||||
url: feishuUrl,
|
||||
autoParam:["id", "name=name"],
|
||||
type: 'get',
|
||||
dataFilter: filter
|
||||
},
|
||||
callback:
|
||||
{
|
||||
beforeClick: ztreeBeforeClick,
|
||||
beforeAsync: ztreeBeforeAsync,
|
||||
onClick: ztreeOnClick,
|
||||
onAsyncSuccess: zTreeOnAsyncSuccess,
|
||||
onAsyncError: zTreeOnAsyncError
|
||||
}
|
||||
};
|
||||
|
||||
function filter(treeId, parentNode, childNodes)
|
||||
{
|
||||
if(!childNodes) return null;
|
||||
for(var i = 0, l = childNodes.length; i < l; i++)
|
||||
{
|
||||
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||
}
|
||||
return childNodes;
|
||||
}
|
||||
|
||||
function ztreeBeforeClick(treeId, treeNode)
|
||||
{
|
||||
if(treeNode.isParent)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function ztreeBeforeAsync(treeId, treeNode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function ztreeOnClick(event, treeId, treeNode)
|
||||
{
|
||||
var treeID = treeNode.tId;
|
||||
if($('#' + treeID).hasClass('loading')) return false;
|
||||
$('#' + treeID).addClass('loading');
|
||||
|
||||
if(treeNode == undefined)
|
||||
{
|
||||
departmentID = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
departmentID = treeNode.id;
|
||||
}
|
||||
var url = createLink('webhook', 'ajaxGetFeishuDeptList', 'webhookID=' + webhookID);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: "post",
|
||||
url: url,
|
||||
data: {departmentID: departmentID},
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(jsonData)
|
||||
{
|
||||
if(jsonData != null)
|
||||
{
|
||||
var data = jsonData;
|
||||
if(data != null && data.length != 0)
|
||||
{
|
||||
if(treeNode == undefined)
|
||||
{
|
||||
ztreeObj.addNodes(null, data, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ztreeObj.addNodes(treeNode, data, true);
|
||||
}
|
||||
}
|
||||
ztreeObj.expandNode(treeNode, true, false, false);
|
||||
|
||||
if(treeNode.checked && !treeNode.nocheck)
|
||||
{
|
||||
var childs = getChildNodes(treeNode);
|
||||
for(i = 0; i < childs.length; i++)
|
||||
{
|
||||
var node = ztreeObj.getNodeByParam("id", childs[i]);
|
||||
ztreeObj.checkNode(node, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function()
|
||||
{
|
||||
alert(requestError);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getChildNodes(treeNode)
|
||||
{
|
||||
var childNodes = ztreeObj.transformToArray(treeNode);
|
||||
var nodes = new Array();
|
||||
for(i = 0; i < childNodes.length; i++)
|
||||
{
|
||||
nodes[i] = childNodes[i].id;
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
||||
function zTreeOnAsyncSuccess()
|
||||
{
|
||||
$("#loadPrompt").remove();
|
||||
}
|
||||
|
||||
function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
var errorMsg = XMLHttpRequest.responseText;
|
||||
alert(errorMsg);
|
||||
}
|
||||
|
||||
var ztreeObj = $.fn.zTree.init($("#deptList"), setting);
|
||||
}
|
||||
else
|
||||
{
|
||||
var ztreeSettings =
|
||||
{
|
||||
view:
|
||||
{
|
||||
showIcon: false
|
||||
},
|
||||
check:
|
||||
{
|
||||
enable: true,
|
||||
chkStyle: "checkbox",
|
||||
chkboxType: {"Y" : "ps", "N" : "ps"}
|
||||
},
|
||||
data:
|
||||
{
|
||||
simpleData: {enable: true}
|
||||
}
|
||||
};
|
||||
ztreeObj = $.fn.zTree.init($("#deptList"), ztreeSettings, deptTree);
|
||||
}
|
||||
|
||||
$('.actions .save').click(function()
|
||||
{
|
||||
var nodes = ztreeObj.getCheckedNodes(true);
|
||||
var selectedDepts = [];
|
||||
for(i in nodes)
|
||||
{
|
||||
node = nodes[i];
|
||||
selectedDepts.push(node.id);
|
||||
}
|
||||
if(selectedDepts.length == 0) return alert('<?php echo $lang->webhook->error->noDept?>');
|
||||
|
||||
var link = createLink('webhook', 'bind', "id=<?php echo $webhookID;?>");
|
||||
link += link.indexOf('?') >= 0 ? '&' : '?';
|
||||
link += "selectedDepts=" + selectedDepts.join(',');
|
||||
location.href = link;
|
||||
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,122 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of webhook module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package webhook
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<?php js::set('urlNote', $lang->webhook->note->typeList);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->create;?></h2>
|
||||
</div>
|
||||
<form id='webhookForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->webhook->type;?></th>
|
||||
<td style="width:550px" ><?php echo html::select('type', $lang->webhook->typeList, '', "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='urlTR'>
|
||||
<th><?php echo $lang->webhook->url;?></th>
|
||||
<td><?php echo html::input('url', '', "class='form-control'");?></td>
|
||||
<td id='urlNote'><?php echo $lang->webhook->note->typeList['default'];?></td>
|
||||
</tr>
|
||||
<tr id='secretTR'>
|
||||
<th><?php echo $lang->webhook->secret;?></th>
|
||||
<td><?php echo html::input('secret', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='dinguserTR'>
|
||||
<th><?php echo $lang->webhook->dingAgentId;?></th>
|
||||
<td class='required'><?php echo html::input('agentId', '', "class='form-control'");?></td>
|
||||
<td><?php echo $lang->webhook->note->dingHelp;?></td>
|
||||
</tr>
|
||||
<tr class='dinguserTR'>
|
||||
<th><?php echo $lang->webhook->dingAppKey;?></th>
|
||||
<td class='required'><?php echo html::input('appKey', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='dinguserTR'>
|
||||
<th><?php echo $lang->webhook->dingAppSecret;?></th>
|
||||
<td class='required'><?php echo html::input('appSecret', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatCorpId;?></th>
|
||||
<td class='required'><?php echo html::input('wechatCorpId', '', "class='form-control'")?></td>
|
||||
<td><?php echo $lang->webhook->note->wechatHelp;?></td>
|
||||
</tr>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatCorpSecret;?></th>
|
||||
<td class='required'><?php echo html::input('wechatCorpSecret', '', "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatAgentId;?></th>
|
||||
<td class='required'><?php echo html::input('wechatAgentId', '', "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='feishuTR'>
|
||||
<th><?php echo $lang->webhook->feishuAppId;?></th>
|
||||
<td class='required'><?php echo html::input('feishuAppId', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='feishuTR'>
|
||||
<th><?php echo $lang->webhook->feishuAppSecret;?></th>
|
||||
<td class='required'><?php echo html::input('feishuAppSecret', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->domain;?></th>
|
||||
<td><?php echo html::input('domain', common::getSysURL(), "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='sendTypeTR'>
|
||||
<th><?php echo $lang->webhook->sendType;?></th>
|
||||
<td><?php echo html::select('sendType', $lang->webhook->sendTypeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo $lang->webhook->note->async;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->product;?></th>
|
||||
<td><?php echo html::select('products[]', $products, '', "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->product;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->execution;?></th>
|
||||
<td><?php echo html::select('executions[]', $executions, '', "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->execution;?></td>
|
||||
</tr>
|
||||
<tr id='paramsTR'>
|
||||
<th>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' id='allParams' name='allParams'>
|
||||
<label for='allParams'><?php echo $lang->webhook->params;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<td class='labelWidth' colspan='2'><?php echo html::checkbox('params', $lang->webhook->paramsList, 'text');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='3' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,137 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view file of webhook module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package webhook
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->edit;?></h2>
|
||||
</div>
|
||||
<form id='webhookForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->webhook->type;?></th>
|
||||
<td><?php echo zget($lang->webhook->typeList, $webhook->type);?></td>
|
||||
<td><?php echo html::hidden('type', $webhook->type);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->name;?></th>
|
||||
<td><?php echo html::input('name', $webhook->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='urlTR' class='<?php echo strpos("dinguser|wechatuser|feishuuser", $webhook->type) !== false ? 'hidden' : '';?>'>
|
||||
<th><?php echo $lang->webhook->url;?></th>
|
||||
<td><?php echo html::input('url', $webhook->url, "class='form-control'");?></td>
|
||||
<td><?php echo zget($lang->webhook->note->typeList, $webhook->type, '');?></td>
|
||||
</tr>
|
||||
<?php if($webhook->type == 'dinggroup' or $webhook->type == 'feishugroup'):?>
|
||||
<tr id='secretTR'>
|
||||
<th><?php echo $lang->webhook->secret;?></th>
|
||||
<td><?php echo html::input('secret', $webhook->secret, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($webhook->type == 'dinguser'):?>
|
||||
<?php $secret = json_decode($webhook->secret);?>
|
||||
<tr class='dingapiTR'>
|
||||
<th><?php echo $lang->webhook->dingAgentId;?></th>
|
||||
<td class='required'><?php echo html::input('agentId', $secret->agentId, "class='form-control'");?></td>
|
||||
<td><?php echo $lang->webhook->note->dingHelp;?></td>
|
||||
</tr>
|
||||
<tr class='dingapiTR'>
|
||||
<th><?php echo $lang->webhook->dingAppKey;?></th>
|
||||
<td class='required'><?php echo html::input('appKey', $secret->appKey, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='dingapiTR'>
|
||||
<th><?php echo $lang->webhook->dingAppSecret;?></th>
|
||||
<td class='required'><?php echo html::input('appSecret', $secret->appSecret, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($webhook->type == 'wechatuser'):?>
|
||||
<?php $secret = json_decode($webhook->secret);?>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatCorpId;?></th>
|
||||
<td class='required'><?php echo html::input('wechatCorpId', $secret->appKey, "class='form-control'")?></td>
|
||||
<td><?php echo $lang->webhook->note->wechatHelp;?></td>
|
||||
</tr>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatCorpSecret;?></th>
|
||||
<td class='required'><?php echo html::input('wechatCorpSecret', $secret->appSecret, "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="wechatTR">
|
||||
<th><?php echo $lang->webhook->wechatAgentId;?></th>
|
||||
<td class='required'><?php echo html::input('wechatAgentId', $secret->agentId, "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($webhook->type == 'feishuuser'):?>
|
||||
<?php $secret = json_decode($webhook->secret);?>
|
||||
<tr class="feishuTR">
|
||||
<th><?php echo $lang->webhook->feishuAppId;?></th>
|
||||
<td class='required'><?php echo html::input('feishuAppId', $secret->appId, "class='form-control'")?></td>
|
||||
</tr>
|
||||
<tr class="feishuTR">
|
||||
<th><?php echo $lang->webhook->feishuAppSecret;?></th>
|
||||
<td class='required'><?php echo html::input('feishuAppSecret', $secret->appSecret, "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->domain;?></th>
|
||||
<td><?php echo html::input('domain', $webhook->domain, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if(strpos("dinggroup|dinguser|wechatgroup|wechatuser|feishuuser|feishugroup", $webhook->type) === false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->sendType;?></th>
|
||||
<td><?php echo html::select('sendType', $lang->webhook->sendTypeList, $webhook->sendType, "class='form-control'");?></td>
|
||||
<td><?php echo $lang->webhook->note->async;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->product;?></th>
|
||||
<td><?php echo html::select('products[]', $products, $webhook->products, "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->product;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->execution;?></th>
|
||||
<td><?php echo html::select('executions[]', $executions, $webhook->executions, "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->execution;?></td>
|
||||
</tr>
|
||||
<?php if(strpos(',bearychat,dinggroup,dinguser,wechatgroup,wechatuser,feishuuser,feishugroup,', ",$webhook->type,") === false):?>
|
||||
<tr id='paramsTR'>
|
||||
<th>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' id='allParams' name='allParams'>
|
||||
<label for='allParams'><?php echo $lang->webhook->params;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<td class='labelWidth' colspan='2'><?php echo html::checkbox('params', $lang->webhook->paramsList, $webhook->params);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', $webhook->desc, "rows='3' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton()?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The log view file of log module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package log
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<?php echo html::a(inlink('browse'), $lang->webhook->common);?>
|
||||
<small class="text-muted"> <?php echo $webhook->name;?></small>
|
||||
<small class="text-muted"> <?php echo $lang->webhook->log;?></small>
|
||||
</h2>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php common::printLink('admin', 'log', '', "<i class='icon icon-cog'> </i> " . $lang->webhook->setting, '', "class='btn btn-primary iframe'", '', true);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id='logList' class='table main-table table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "id={$webhook->id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='c-full-date'><?php common::printOrderLink('date', $orderBy, $vars, $lang->webhook->date);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->webhook->url);?></th>
|
||||
<th class='c-webhook-action'><?php common::printOrderLink('action', $orderBy, $vars, $lang->webhook->action);?></th>
|
||||
<th class='c-type'><?php common::printOrderLink('contentType', $orderBy, $vars, $lang->webhook->contentType);?></th>
|
||||
<th class='c-result'><?php common::printOrderLink('result', $orderBy, $vars, $lang->webhook->result);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($logs as $id => $log):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td><?php echo $log->date;?></td>
|
||||
<td title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
<?php $iframe = zget($log, 'dialog', 0) == 1 ? 'data-toggle="modal" data-type="iframe"' : '';?>
|
||||
<?php if(zget($log, 'dialog', 0) == 1) $log->actionURL = $this->createLink($log->module, 'view', "id=$log->moduleID", '' , true)?>
|
||||
<?php if($log->action):?>
|
||||
<td title='<?php echo $log->action;?>'><?php echo html::a($log->actionURL, $log->action, '', $iframe);?></td>
|
||||
<?php else:?>
|
||||
<td title='<?php echo $lang->webhook->approval;?>'><?php echo $lang->webhook->approval;?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $log->contentType;?>'><?php echo $log->contentType;?></td>
|
||||
<td title='<?php echo $log->result;?>'><?php echo $log->result;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($logs):?>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user