110 lines
5.4 KiB
HTML
Executable File
110 lines
5.4 KiB
HTML
Executable File
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
|
<li><a href="<?php echo url('/admin/customer_group/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/customer_group/create');?>" method="post">
|
|
<div class="form-group">
|
|
<label for="name" class="col-sm-2 control-label">会员组名称<em style="color:red;">*</em></label>
|
|
<div class="col-sm-5">
|
|
<input type="text" class="form-control" name="name" id="name" required>
|
|
</div>
|
|
<div class="col-sm-5">
|
|
<span class="help-block">(会员组名称)</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="sort" class="col-sm-2 control-label">会员组排序<em style="color:red;">*</em></label>
|
|
<div class="col-sm-2">
|
|
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
|
</div>
|
|
<div class="col-sm-5 col-sm-offset-3">
|
|
<span class="help-block">(会员组排序)</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="description" class="col-sm-2 control-label">会员组描述</label>
|
|
<div class="col-sm-5">
|
|
<textarea class="form-control" name="description"></textarea>
|
|
</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">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="agree"> 确认添加
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<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">
|
|
$(function() {
|
|
$("form.form-horizontal").submit(function(e) {
|
|
var nameObj = document.getElementById('name');
|
|
if (isNull(nameObj.value)) {
|
|
alert('名称必须填写');
|
|
nameObj.focus();
|
|
return false;
|
|
}
|
|
var sortObj = document.getElementById('sort');
|
|
if (isNaN(sortObj.value)) {
|
|
alert('排序值必须是数字');
|
|
sortObj.focus();
|
|
return false;
|
|
}
|
|
var agree = $("input[name='agree']", this).prop('checked');
|
|
if (agree) {
|
|
//alert("Submitted");
|
|
//e.preventDefault();
|
|
} else {
|
|
e.preventDefault();
|
|
alert("Submit prevented");
|
|
}
|
|
});
|
|
});
|
|
</script> |