153 lines
7.7 KiB
HTML
Executable File
153 lines
7.7 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/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
|
<li><a href="<?php echo url('/admin/action_log/lists');?>"> 日志列表</a></li>
|
|
<li class="active">日志</li>
|
|
</ol>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="row">
|
|
<div class="col-md-10">
|
|
<form class="form-horizontal" action="<?php echo url('/admin/action_log/update');?>" method="post">
|
|
<div class="nav-tabs-custom">
|
|
<ul class="nav nav-tabs">
|
|
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div class="active tab-pane" id="navfirst">
|
|
<div class="form-group">
|
|
<label for="name" class="col-sm-2 control-label">标题</label>
|
|
<div class="col-sm-5">
|
|
<input type="text" class="form-control" name="title" id="name" required value="<?php echo $action_log['title'];?>">
|
|
</div>
|
|
<div class="col-sm-5">
|
|
<span class="help-block">(标题)</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="ip" class="col-sm-2 control-label">IP</label>
|
|
<div class="col-sm-2">
|
|
<input type="text" class="form-control" name="ip" id="ip" value="<?php echo $action_log['ip'];?>">
|
|
</div>
|
|
<div class="col-sm-5 col-sm-offset-3">
|
|
<span class="help-block">(IP)</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="url" class="col-sm-2 control-label">网址</label>
|
|
<div class="col-sm-5 has-feedback">
|
|
<input type="text" class="form-control" name="url" value="<?php echo $action_log['url'];?>">
|
|
<span class="fa fa-globe form-control-feedback"></span>
|
|
</div>
|
|
<div class="col-sm-5">
|
|
<span class="help-block">(网址)</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="param" class="col-sm-2 control-label">参数</label>
|
|
<div class="col-sm-5">
|
|
<textarea class="form-control" name="param"><?php echo $action_log['param'];?></textarea>
|
|
</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 $action_log['content'];?></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>
|
|
<!-- /.tab-pane -->
|
|
</div>
|
|
<!-- /.tab-content -->
|
|
<div class="nav-footer row">
|
|
<input name="id" value="<?php echo $action_log['id'];?>" type="hidden">
|
|
<div class="col-sm-2 col-sm-offset-2">
|
|
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
|
|
</div>
|
|
<!-- /. row -->
|
|
</div>
|
|
</div>
|
|
<!-- /.nav-tabs-custom -->
|
|
</form>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<div class="box box-primary">
|
|
<div class="box-header">
|
|
<h3 class="box-title">快捷入口</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<a href="<?php echo url('/admin/action_log/lists');?>" class="btn btn-block btn-primary">日志列表</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
<style>
|
|
.table thead > tr > td, .table tbody > tr > td {
|
|
vertical-align: middle;
|
|
}
|
|
</style>
|
|
<!-- /.content-wrapper -->
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
$("#reset-btn").click(function(e) {
|
|
if (confirm('确认重置所有表单项吗?')) {
|
|
this.form.reset();
|
|
}
|
|
});
|
|
$("form.form-horizontal").submit(function(e) {
|
|
var nameObj = document.getElementById('title');
|
|
if (isNull(nameObj.value)) {
|
|
alert('日志必须填写');
|
|
nameObj.focus();
|
|
return false;
|
|
}
|
|
// var agree = $("input[name='agree']", this).prop('checked');
|
|
// if (agree) {
|
|
// alert("Submitted");
|
|
// e.preventDefault();
|
|
// } else {
|
|
// e.preventDefault();
|
|
// alert("请勾选确认");
|
|
// }
|
|
});
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
//common.js
|
|
function isNull(data) {
|
|
return (data == "" || data == undefined || data == null) ? true : false;
|
|
}
|
|
function trim(str) {
|
|
return str.replace(/(^\s*)|(\s*$)/g, '');
|
|
}
|
|
</script> |