* adjust for webhook and message page.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . 'webhook/view/header.html.php';?>
|
||||
<?php include $this->app->getModuleRoot() . 'message/view/header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-600px'>
|
||||
@@ -31,4 +31,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){$('#mainMenu #webhookTab').addClass('btn-active-text');})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
.checkbox-inline + .checkbox-inline {margin:0px;}
|
||||
.checkbox-inline {margin:0px; margin-right:10px !important; width:100px;}
|
||||
.checkbox-primary + .checkbox-primary {margin:0px;}
|
||||
.checkbox-primary {margin:0px; margin-right:10px !important; width:100px;display:inline-block}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<?php if(isset($config->message->typeLink[$type])):?>
|
||||
<?php list($moduleName, $methodName) = explode('|', $config->message->typeLink[$type]);?>
|
||||
<?php if(!common::hasPriv($moduleName, $methodName)) continue;?>
|
||||
<?php echo html::a($this->createLink($moduleName, $methodName), "<span class='text'>$typeName</span>", '', "class='btn btn-link'")?>
|
||||
<?php echo html::a($this->createLink($moduleName, $methodName), "<span class='text'>$typeName</span>", '', "class='btn btn-link' id='{$type}Tab'")?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php if(common::hasPriv('message', 'setting')) echo html::a($this->createLink('message', 'setting'), "<span class='text'>{$lang->message->setting}</span>", '', "class='btn btn-link'")?>
|
||||
<?php if(common::hasPriv('message', 'setting')) echo html::a($this->createLink('message', 'setting'), "<span class='text'>{$lang->message->setting}</span>", '', "class='btn btn-link' id='settingTab'")?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,64 +11,72 @@
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-hover table-striped table-bordered'>
|
||||
<thead>
|
||||
<th></th>
|
||||
<?php foreach($lang->message->typeList as $type => $typeName):?>
|
||||
<th><input type='checkbox' class='messageType' /> <?php echo $typeName;?></th>
|
||||
<?php endforeach;?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($config->message->objectTypes as $objectType => $actions):?>
|
||||
<tr>
|
||||
<td class='w-90px'>
|
||||
<label class='checkbox-inline'>
|
||||
<input type='checkbox' class='objectType' /> <strong><?php echo $objectTypes[$objectType];?></strong>
|
||||
</label>
|
||||
</td>
|
||||
<?php $messageSetting = is_string($config->message->setting) ? json_decode($config->message->setting, true) : $config->message->setting;?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-bordered'>
|
||||
<thead>
|
||||
<th></th>
|
||||
<?php foreach($lang->message->typeList as $type => $typeName):?>
|
||||
<?php if(isset($config->message->available[$type][$objectType])):?>
|
||||
<?php
|
||||
$availableActions = array();
|
||||
foreach($config->message->available[$type][$objectType] as $action)
|
||||
{
|
||||
if(!isset($objectActions[$objectType][$action])) continue;
|
||||
$availableActions[$action] = $objectActions[$objectType][$action];
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<?php
|
||||
echo html::checkbox("messageSetting[$type][setting][$objectType]", $availableActions, isset($messageSetting[$type]['setting'][$objectType]) ? join(',', $messageSetting[$type]['setting'][$objectType]) : '');
|
||||
if(isset($config->message->condition[$type][$objectType]))
|
||||
{
|
||||
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
|
||||
$this->app->loadLang($moduleName);
|
||||
foreach(explode(',', $config->message->condition[$type][$objectType]) as $condition)
|
||||
{
|
||||
$listKey = $condition . 'List';
|
||||
$list = isset($this->lang->$moduleName->$listKey) ? $this->lang->$moduleName->$listKey : $users;
|
||||
echo html::select("messageSetting[$type][condition][$objectType][$condition][]", $list, isset($messageSetting[$type]['condition'][$objectType][$condition]) ? join(',', $messageSetting[$type]['condition'][$objectType][$condition]) : '', "class='form-control chosen' multiple data-placeholder='{$this->lang->$moduleName->$condition}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<th>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' class='messageType' id='<?php echo 'type-' . $type?>' />
|
||||
<label for='<?php echo 'type-' . $type?>'><?php echo $typeName;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<?php endforeach;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo count($lang->message->typeList) + 1?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($config->message->objectTypes as $objectType => $actions):?>
|
||||
<tr>
|
||||
<td class='w-90px'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' class='objectType' id='<?php echo 'objectType-' . $objectType;?>' />
|
||||
<label for='<?php echo 'objectType-' . $objectType;?>'><?php echo $objectTypes[$objectType];?></label>
|
||||
</div>
|
||||
</td>
|
||||
<?php $messageSetting = is_string($config->message->setting) ? json_decode($config->message->setting, true) : $config->message->setting;?>
|
||||
<?php foreach($lang->message->typeList as $type => $typeName):?>
|
||||
<?php if(isset($config->message->available[$type][$objectType])):?>
|
||||
<?php
|
||||
$availableActions = array();
|
||||
foreach($config->message->available[$type][$objectType] as $action)
|
||||
{
|
||||
if(!isset($objectActions[$objectType][$action])) continue;
|
||||
$availableActions[$action] = $objectActions[$objectType][$action];
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<?php
|
||||
echo html::checkbox("messageSetting[$type][setting][$objectType]", $availableActions, isset($messageSetting[$type]['setting'][$objectType]) ? join(',', $messageSetting[$type]['setting'][$objectType]) : '');
|
||||
if(isset($config->message->condition[$type][$objectType]))
|
||||
{
|
||||
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
|
||||
$this->app->loadLang($moduleName);
|
||||
foreach(explode(',', $config->message->condition[$type][$objectType]) as $condition)
|
||||
{
|
||||
$listKey = $condition . 'List';
|
||||
$list = isset($this->lang->$moduleName->$listKey) ? $this->lang->$moduleName->$listKey : $users;
|
||||
echo html::select("messageSetting[$type][condition][$objectType][$condition][]", $list, isset($messageSetting[$type]['condition'][$objectType][$condition]) ? join(',', $messageSetting[$type]['condition'][$objectType][$condition]) : '', "class='form-control chosen' multiple data-placeholder='{$this->lang->$moduleName->$condition}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo count($lang->message->typeList) + 1?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){$('#featurebar .nav #settingTab').addClass('active');})
|
||||
$(function(){$('#mainMenu #settingTab').addClass('btn-active-text');})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.labelWidth label.checkbox-inline {width: 20%;}
|
||||
.checkbox-inline + .checkbox-inline {margin-left: 0px;}
|
||||
.labelWidth .checkbox-primary {width: 20%; display:inline-block}
|
||||
.checkbox-primary + .checkbox-primary {margin-left: 0px;}
|
||||
.objectType {margin-right: 5px !important;}
|
||||
#paramsTR th{padding-left:30px;}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.labelWidth label.checkbox-inline {width: 20%;}
|
||||
.checkbox-inline + .checkbox-inline {margin-left: 0px;}
|
||||
.labelWidth .checkbox-primary {width: 20%; display:inline-block}
|
||||
.checkbox-primary + .checkbox-primary {margin-left: 0px;}
|
||||
.objectType {margin-right: 5px !important;}
|
||||
#paramsTR th{padding-left:30px;}
|
||||
|
||||
@@ -28,7 +28,7 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).parents('tr').find('input[type=checkbox]').removeAttr('checked');
|
||||
$(this).parents('tr').find('input[type=checkbox][disabled!=disabled]').removeAttr('checked');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).parents('tr').find('input[type=checkbox]').removeAttr('checked');
|
||||
$(this).parents('tr').find('input[type=checkbox][disabled!=disabled]').removeAttr('checked');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -12,44 +12,44 @@
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->webhook->confirmDelete);?>
|
||||
<form id='ajaxForm' method='post'>
|
||||
<table id='webhookList' class='table table-condensed table-hover table-striped table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='w-60px'><?php common::printOrderLink('type', $orderBy, $vars, $lang->webhook->type);?></th>
|
||||
<th class='w-200px 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='w-70px'><?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-center'><?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='text-right'>
|
||||
<?php
|
||||
common::printIcon('webhook', 'log', "webhookID=$id", '', 'list', 'file-text-o');
|
||||
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-icon'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5'><?php $pager->show();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class='main-table' id='ajaxForm' method='post'>
|
||||
<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='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='w-60px'><?php common::printOrderLink('type', $orderBy, $vars, $lang->webhook->type);?></th>
|
||||
<th class='w-200px 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='w-110px'><?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-center'><?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'>
|
||||
<?php
|
||||
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 btn-link'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($webhooks):?>
|
||||
<div class='table-footer'><?php $pager->show('rignt', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -13,57 +13,62 @@
|
||||
<?php include 'header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<?php js::set('urlNote', $lang->webhook->note->typeList);?>
|
||||
<div class='container mw-1400px'>
|
||||
<form id='webhookForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->type;?></th>
|
||||
<td class='w-p50'><?php echo html::select('type', $lang->webhook->typeList, 'default', "class='form-control'");?></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>
|
||||
<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='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->project;?></th>
|
||||
<td><?php echo html::select('projects[]', $projects, '', "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->project;?></td>
|
||||
</tr>
|
||||
<tr id='paramsTR'>
|
||||
<th>
|
||||
<label class='checkbox-inline'>
|
||||
<input type='checkbox' id='allParams' name='allParams'><strong><?php echo $lang->webhook->params;?></strong>
|
||||
</label>
|
||||
</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><?php echo html::submitButton();?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-1400px'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->create;?></h2>
|
||||
</div>
|
||||
<form id='webhookForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->type;?></th>
|
||||
<td class='w-p50'><?php echo html::select('type', $lang->webhook->typeList, 'default', "class='form-control'");?></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>
|
||||
<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='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->project;?></th>
|
||||
<td><?php echo html::select('projects[]', $projects, '', "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->project;?></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><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -12,61 +12,66 @@
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div class='container mw-1400px'>
|
||||
<form id='webhookForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->type;?></th>
|
||||
<td class='w-p50'><?php echo html::select('type', $lang->webhook->typeList, $webhook->type, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->name;?></th>
|
||||
<td class='w-p50'><?php echo html::input('name', $webhook->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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 != 'dingding'):?>
|
||||
<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->project;?></th>
|
||||
<td><?php echo html::select('projects[]', $projects, $webhook->projects, "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->project;?></td>
|
||||
</tr>
|
||||
<?php if(strpos(',bearychat,dingding,', ",$webhook->type,") === false):?>
|
||||
<tr>
|
||||
<th>
|
||||
<label class='checkbox-inline'>
|
||||
<input type='checkbox' id='allParams' name='allParams'><strong><?php echo $lang->webhook->params;?></strong>
|
||||
</label>
|
||||
</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><?php echo html::submitButton();?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-1400px'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->edit;?></h2>
|
||||
</div>
|
||||
<form id='webhookForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->type;?></th>
|
||||
<td class='w-p50'><?php echo html::select('type', $lang->webhook->typeList, $webhook->type, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->webhook->name;?></th>
|
||||
<td class='w-p50'><?php echo html::input('name', $webhook->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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 != 'dingding'):?>
|
||||
<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->project;?></th>
|
||||
<td><?php echo html::select('projects[]', $projects, $webhook->projects, "class='form-control chosen' multiple");?></td>
|
||||
<td><?php echo $lang->webhook->note->project;?></td>
|
||||
</tr>
|
||||
<?php if(strpos(',bearychat,dingding,', ",$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><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,48 +11,50 @@
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<div id="titlebar">
|
||||
<div class="heading">
|
||||
<strong><?php echo html::a(inlink('browse'), $lang->webhook->common);?></strong>
|
||||
<small class="text-muted"> <?php echo $webhook->name;?></small>
|
||||
<small class="text-muted"> <?php echo $lang->webhook->log;?></small>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<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'");?>
|
||||
<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'");?>
|
||||
</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='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='w-160px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->webhook->date);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->webhook->url);?></th>
|
||||
<th class='w-300px'><?php common::printOrderLink('action', $orderBy, $vars, $lang->webhook->action);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('contentType', $orderBy, $vars, $lang->webhook->contentType);?></th>
|
||||
<th class='w-200px'><?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 class='text' title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
<td class='text' title='<?php echo $log->action;?>'><?php echo html::a($log->actionURL, $log->action);?></td>
|
||||
<td class='text-center'><?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>
|
||||
<table id='logList' class='table table-condensed table-hover table-striped tablesorter table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "id={$webhook->id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->webhook->id);?></th>
|
||||
<th class='w-160px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->webhook->date);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->webhook->url);?></th>
|
||||
<th class='w-300px'><?php common::printOrderLink('action', $orderBy, $vars, $lang->webhook->action);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('contentType', $orderBy, $vars, $lang->webhook->contentType);?></th>
|
||||
<th class='w-200px'><?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 class='text' title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
<td class='text' title='<?php echo $log->action;?>'><?php echo html::a($log->actionURL, $log->action);?></td>
|
||||
<td class='text-center'><?php echo $log->contentType;?></td>
|
||||
<td title='<?php echo $log->result;?>'><?php echo $log->result;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='6'><?php $pager->show();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user