You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
4.0 KiB
138 lines
4.0 KiB
{extend name="admin@public/base" /}
|
|
{block name="main-content"}
|
|
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script>
|
|
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script>
|
|
<script src="__PUBLIC__/others/jquery-ui-1.10.3.min.js"></script>
|
|
<script src="__PUBLIC__/others/jquery.ui.widget.js"></script>
|
|
<script src="__PUBLIC__/others/jquery.fileupload.js"></script>
|
|
<script src="__PUBLIC__/others/base.js"></script>
|
|
<style>
|
|
.table-bordered>tbody>tr>td{padding:4px;}
|
|
.filebtn{
|
|
position: relative;
|
|
display: inline-block;
|
|
background: #d0eeff;
|
|
border: 1px solid #99d3f5;
|
|
border-radius: 4px;
|
|
padding: 4px 9pt;
|
|
overflow: hidden;
|
|
color: #1e88c7;
|
|
text-decoration: none;
|
|
text-indent: 0;
|
|
line-height: 25px;
|
|
}
|
|
.filebtn input[type='file']{
|
|
position: absolute;
|
|
z-index:999;
|
|
font-size: 75pt;
|
|
right: 10;
|
|
top: 0;
|
|
opacity: 0;
|
|
}
|
|
</style>
|
|
<div class="page-content">
|
|
<!--主题-->
|
|
<div class="page-header">
|
|
<h1>
|
|
您当前操作
|
|
<small>
|
|
<i class="ace-icon fa fa-angle-double-right"></i>
|
|
添加服务机构
|
|
</small>
|
|
</h1>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<form class="form-horizontal postForm" name="agencys_add" method="post" action="{:url('admin/Agencys/runadduser',['kind'=>$kind])}">
|
|
|
|
<input type="hidden" id="userid" value="" >
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">姓名</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="username" name="username" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">头像</label>
|
|
<div class="col-sm-10">
|
|
<a href="javascript:;" class="filebtn">
|
|
<input type="file" name="avatarbtn" id="avatarbtn" />
|
|
<input type="hidden" name="avatar" id="avatar" />
|
|
选择上传文件
|
|
</a>
|
|
<span class="showPic"><img src="__PUBLIC__/img/no_img.jpg" height="70" id="img0" ></span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">简介</label>
|
|
<div class="col-sm-10">
|
|
<textarea name="infor" id="infor" ></textarea>
|
|
<script type="text/javascript">
|
|
var editor3 = new UE.ui.Editor();
|
|
editor3.render("infor");
|
|
</script>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-4"></div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label no-padding-right" > 是否审核: </label>
|
|
<div class="col-sm-10" style="padding-top:5px;">
|
|
<input name="status" id="status" checked value="1" type="checkbox" />
|
|
</div>
|
|
</div>
|
|
<div class="space-4"></div>
|
|
|
|
<div class="clearfix form-actions">
|
|
<div class="col-md-offset-3 col-md-9">
|
|
<button class="btn btn-info" type="submit">
|
|
<i class="ace-icon fa fa-check bigger-110"></i>
|
|
保存
|
|
</button>
|
|
|
|
|
|
<button class="btn" type="reset">
|
|
<i class="ace-icon fa fa-undo bigger-110"></i>
|
|
重置
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</div><!-- /.page-content -->
|
|
<script>
|
|
|
|
function showRequest2(){
|
|
var username=$("#username").val();
|
|
var avatar=$("#avatar").val();
|
|
var content = editor3.getContent();
|
|
var userid=$("#userid").val();
|
|
if(typeof username=='undefined'||username==''){
|
|
tool.msg("姓名必填");
|
|
return false;
|
|
}
|
|
if(typeof avatar=='undefined'||avatar==''){
|
|
tool.msg("图像必上传");
|
|
return false;
|
|
}
|
|
if(typeof content=='undefined'||content==''){
|
|
tool.msg("简介必填");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
$(function(){
|
|
$('.postForm').ajaxForm({
|
|
beforeSerialize: showRequest2, //提交前的回调函数
|
|
success: complete, // 这是提交后的方法
|
|
dataType: 'json'
|
|
});
|
|
var url="{:url('upload',['key'=>'avatarbtn'])}";
|
|
tool.uploadFile(url,"#avatarbtn","#avatar");
|
|
|
|
})
|
|
</script>
|
|
{/block}
|