init
This commit is contained in:
143
app/admin/view/pinglun/add.html
Executable file
143
app/admin/view/pinglun/add.html
Executable file
@@ -0,0 +1,143 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
添加评论
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论列表</a></li>
|
||||
<li class="active"> 评论</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加评论</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/pinglun/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">内容ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="content_id" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">类别</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<?php $typeOption=array('0' => '暂无类型', 'Article' => '文章','Product' => '产品','Video' => '视频','Download' => '下载');
|
||||
foreach($typeOption as $k=>$v):?>
|
||||
<option value="<?php echo $k;?>"><?php echo $v;?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="checked" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="1" checked=""> 已审核
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="0"> 未审核
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cname" class="col-sm-2 control-label">评论人</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="hidden" name="customer_id" value="1">
|
||||
<input type="text" class="form-control" name="cname">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论人)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">评论内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="content"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">评论时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="createtime" value="" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<input type="hidden" name="pid" value="<?php echo $pid;?>">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
137
app/admin/view/pinglun/edit.html
Executable file
137
app/admin/view/pinglun/edit.html
Executable file
@@ -0,0 +1,137 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
编辑评论
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论列表</a></li>
|
||||
<li class="active"> 评论</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑评论</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/pinglun/update');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">内容ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="content_id" readonly value="<?php echo $pinglun['content_id'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">类别</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo array_switch(array('0' => '暂无类型', 'Article' => '文章','Product' => '产品','Video' => '视频','Download' => '下载'),$pinglun['typeid'],'暂无类型');?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="checked" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="1" <?php if($pinglun['display']):?>checked=""<?php endif;?>> 已审核
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="0" <?php if(!$pinglun['display']):?>checked=""<?php endif;?>> 未审核
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cname" class="col-sm-2 control-label">评论人</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="cname" value="<?php echo $pinglun['cname'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论人)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">评论内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="content"><?php echo $pinglun['content'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">评论时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="createtime" value="<?php echo $pinglun['createtime'];?>" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $pinglun['id'];?>">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
119
app/admin/view/pinglun/lists.html
Executable file
119
app/admin/view/pinglun/lists.html
Executable file
@@ -0,0 +1,119 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
评论管理
|
||||
<small>评论列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论</a></li>
|
||||
<li class="active"> 评论列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">评论列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem">ID</th>
|
||||
<th width="60rem">内容ID</th>
|
||||
<th width="100rem" class="text-center">类型</th>
|
||||
<th class="text-center">评论人</th>
|
||||
<th class="text-center">评论内容</th>
|
||||
<th width="75rem" class="text-center">热门推荐</th>
|
||||
<th width="75rem" class="text-center">状态</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="135rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$pinglun):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $pinglun['id'];?>"></td>
|
||||
<td><?php echo $pinglun['id'];?></td>
|
||||
<td class="text-center"><?php echo $pinglun['content_id'];?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('0' => '暂无类型', 'Article' => '文章','Product' => '产品','Video' => '视频','Download' => '下载'),$pinglun['typeid'],'暂无类型');?></td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/pinglun/edit',['id'=>$pinglun['id']]);?>"><?php echo $pinglun['cname'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $pinglun['content'];?></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($pinglun['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $pinglun['id'];?>" data-url="<?php echo url('/admin/pinglun/toggleishot');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo array_switch(array('0' => '<label style="color:red;">未审核</label>', '1' => '<label style="color:green;">启用</label>'),$pinglun['display'],'审核');?>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $pinglun['createtime'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/pinglun/reply',['id'=>$pinglun['id']]);?>">回复</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/pinglun/edit',['id'=>$pinglun['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $pinglun['id'];?>" data-url="<?php echo url('/admin/pinglun/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls row">
|
||||
<div class="col-sm-6">
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/checked');?>" data-cod="batch">标记已审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/unchecked');?>" data-cod="batch">标记未审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
<?php if($page):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
138
app/admin/view/pinglun/reply.html
Executable file
138
app/admin/view/pinglun/reply.html
Executable file
@@ -0,0 +1,138 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
回复评论
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论列表</a></li>
|
||||
<li class="active"> 评论</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">回复评论</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/pinglun/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">内容ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="content_id" readonly value="<?php echo $pinglun['content_id'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display:none;">
|
||||
<label for="type" class="col-sm-2 control-label">类别</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="typeid" readonly value="<?php echo $pinglun['typeid'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="checked" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="1" checked=""> 已审核
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="0"> 未审核
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cname" class="col-sm-2 control-label">回复人</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="hidden" name="customer_id" value="1">
|
||||
<input type="text" class="form-control" name="cname">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(回复人)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">回复内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="content"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(回复内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">回复时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="createtime" value="<?php echo date('Y-m-d H:i:s');?>" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(评论时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<input type="hidden" name="pid" value="<?php echo $pinglun['id'];?>">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user