* adjust for webhook and message page.

This commit is contained in:
wangyidong
2018-04-24 11:13:01 +08:00
parent 6a3b7a11ee
commit 6be5af956c
12 changed files with 280 additions and 255 deletions
+61 -56
View File
@@ -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';?>