why.xingtongworld.com项目
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.
 
 
 
 
 

82 lines
2.5 KiB

{extend name="admin@public/base" /}
{block name="main-content"}
<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="form0" method="post" action="{:url('runedit')}" enctype="multipart/form-data">
<input type="hidden" name="id" value="{$list.sms_id}" />
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">手机号: </label>
<div class="col-sm-10">
<input type="text" name="sms_tel" class="col-xs-10 col-sm-6" required value="{$list.sms_tel}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">发送内容: </label>
<div class="col-sm-10">
<textarea rows="5" name="sms_txt" class="col-xs-10 col-sm-6" required>{$list.sms_txt?$list.sms_txt:$list.sms_code}</textarea>
</div>
</div>
{if condition="$list['sms_state'] neq 1"}
<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="sms_state" value="0" {if condition="$list['sms_state'] neq -1"}checked{/if} class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" />
<span class="lbl">&nbsp;&nbsp;默认关闭</span>
</div>
</div>
{/if}
<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>
&nbsp; &nbsp; &nbsp;
<button class="btn" type="reset">
<i class="ace-icon fa fa-undo bigger-110"></i>
重置
</button>
</div>
</div>
</form>
</div>
</div>
<script>
/**判断是否是手机号**/
function isPhoneNumber(tel) {
var reg =/^0?1[3|4|5|6|7|8][0-9]\d{8}$/;
return reg.test(tel);
}
function showRequest2(){
var tel=$("input[name='sms_tel']").val();
if(!isPhoneNumber(tel)){
layer.msg("请填写正确手机号码");
return false;
}
loading("保存中");
return true;
}
$(function(){
$('.postForm').ajaxForm({
beforeSerialize: showRequest2, //提交前的回调函数
success: complete, // 这是提交后的方法
dataType: 'json'
});
})
</script>
{/block}