Browse Source

自定义表单体验优化

tags/6.3.0
叙述、别离 1 year ago
parent
commit
69bfc8ddf9
3 changed files with 15 additions and 14 deletions
  1. +2
    -2
      src/admin/templets/diy_edit_content.htm
  2. +10
    -10
      src/admin/templets/diy_list.htm
  3. +3
    -2
      src/admin/templets/diy_main.htm

+ 2
- 2
src/admin/templets/diy_edit_content.htm View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>修改自定义表单数据</title>
<title>修改<?php echo $diy->name;?>数据</title>
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
@@ -14,7 +14,7 @@
<input type="hidden" name="id" value="<?php echo $row['id'];?>">
<table align="center" class="table maintable my-3">
<tr>
<td bgcolor="#f8fafb" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">自定义表单管理</a> - 修改自定义表单数据</td>
<td bgcolor="#f8fafb" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">自定义表单管理</a> - 修改<?php echo $diy->name;?>数据</td>
</tr>
<?php
$formfields = '';


+ 10
- 10
src/admin/templets/diy_list.htm View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title><?php echo $diy->name;?></title>
<title><?php echo $diy->name;?>列表</title>
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
@@ -13,14 +13,14 @@
<input type="hidden" name="diyid" value="<?php echo $diyid;?>">
<table align="center" class="table maintable my-3">
<tr>
<td colspan="3" bgcolor="#f8fafb">自定义表单管理</a> - <?php echo $diy->name;?></td>
<td colspan="2" bgcolor="#f8fafb">自定义表单管理</a> - <?php echo $diy->name;?>列表</td>
</tr>
{dede:datalist}
<?php
if (!empty($fields)) {
$allowhtml = array('htmltext');
$fields['sta'] = $fields['ifcheck'] == 1 ? '已审核':'未审核';
echo '<tr bgcolor="#f8f9fa">
echo '<tr>
<td width="16%">
<label><input type="checkbox" name="id[]" value="'.$fields['id'].'"> '.$fields['id'].'表单'.$fields['sta'].'</label>
</td>
@@ -28,10 +28,10 @@
<a href="diy_list.php?action=edit&diyid='.$diy->diyid.'&id='.$fields['id'].'" class="btn btn-light btn-sm"><i class="fa fa-pencil-square"></i></a>
</td>
</tr>';
foreach($fieldlist as $field=>$fielddata)
foreach($fieldlist as $field => $fielddata)
{
if ($fields[$field]=='') continue;
if (!in_array($fielddata[1],$allowhtml)) {
if ($fields[$field] == '') continue;
if (!in_array($fielddata[1], $allowhtml)) {
$fields[$field] = dede_htmlspecialchars($fields[$field]);
}
echo '<tr><td>'.$fielddata[0].'</td><td>'.$fields[$field].'</td></tr>';
@@ -42,7 +42,7 @@
?>
{/dede:datalist}
<tr>
<td colspan="3">
<td colspan="2">
<label><input type="radio" name="action" value="check"> 审核</label>
<label><input type="radio" name="action" value="delete"> 删除</label>
<button type="button" name="select" onclick="selAll()" class="btn btn-success btn-sm">全选</button>
@@ -52,18 +52,18 @@
</td>
</tr>
<tr>
<td colspan="3" bgcolor="#f8fafb">{dede:pagelist listsize='6'/}</td>
<td colspan="2" bgcolor="#f8fafb">{dede:pagelist listsize='6'/}</td>
</tr>
</table>
</form>
<script>
function selAll(){
function selAll() {
var a = document.getElementsByTagName("input");
for (var i = 0; i < a.length; i++){
if (a[i].type == "checkbox") a[i].checked = true;
}
}
function noSelAll(){
function noSelAll() {
var a = document.getElementsByTagName("input");
for (var i = 0; i < a.length; i++){
if (a[i].type == "checkbox") a[i].checked = false;


+ 3
- 2
src/admin/templets/diy_main.htm View File

@@ -16,8 +16,8 @@
</tr>
<tr bgcolor="#f8f9fa" align="center">
<td width="6%">表单</td>
<td width="30%">名称</td>
<td width="20%">表名</td>
<td width="26%">名称</td>
<td width="26%">表名</td>
<td>操作</td>
</tr>
{dede:datalist empty='<tr><td colspan="4" align="center">暂无记录</td></tr>'}
@@ -27,6 +27,7 @@
<td>{dede:field.table/}</td>
<td>
<a href="diy_edit.php?diyid={dede:field.diyid/}&dopost=edit" class="btn btn-light btn-sm"><i class="fa fa-pencil-square"></i> 修改</a>
<a href="diy_list.php?action=list&diyid={dede:field.diyid/}" class="btn btn-light btn-sm"><i class="fa fa-file-text"></i> 列表</a>
<a href="diy_list.php?action=excel&diyid={dede:field.diyid/}" target="_blank" class="btn btn-light btn-sm"><i class="fa fa-share-square"></i> 导出</a>
<a href="{dede:global.cfg_phpurl/}/diy.php?action=list&diyid={dede:field.diyid/}" class="btn btn-light btn-sm" target="_blank"><i class="fa fa-eye"></i> 预览</a>
<a href="diy_edit.php?diyid={dede:field.diyid/}&dopost=delete" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除</a>


Loading…
Cancel
Save