< extend name = "Public/base" / >
< block name = "css" >
< link rel = "stylesheet" type = "text/css" href = "__CSS__/admin_table.css" media = "all" >
< link rel = "stylesheet" type = "text/css" href = "__STATIC__/webuploader/webuploader.css" media = "all" >
< style >
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.bnt_add,.bnt_remove,.bnt_save{
height: 30px;
width: 20px;
font-size: 20px;
line-height: 10px;
color: #3399ff;
background: none;
border: none;
margin-left: 20px;
cursor: pointer;
}
.bnt_remove{
color: #F70909;
}
.bnt_save{
color: #4DB361;
}
< / style >
< / block >
<!-- 管理员用户组新增和编辑页面 -->
< block name = "body" >
< script src = "__STATIC__/layer/layer.js" type = "text/javascript" > < / script >
< script src = "__STATIC__/layer/extend/layer.ext.js" type = "text/javascript" > < / script >
< script type = "text/javascript" src = "__STATIC__/uploadify/jquery.uploadify.min.js" > < / script >
< form action = "{:U('Game/devide_warn_edit')}" enctype = "application/x-www-form-urlencoded" method = "POST"
class="form-horizontal form_info_ml">
< div class = "formtitle" > < span > 预警编辑< / span > < / div >
< ul class = "form_info " >
< input type = "hidden" name = "id" value = "{$warnInfo.id}" / >
< li >
< label > 预警对象< / label >
< select id = "partner_id" name = "partner_id" class = "select_gallery" >
<?php foreach ($partners as $p):?>
< option value = "{$p['id']}" > {$p.partner}< / option >
<?php endforeach;?>
< / select >
< / li >
< li >
< label > 预付金额< / label >
< input name = "advance_amount" type = "text" class = "txt" placeholder = "预付金额" value = "{$warnInfo.advance_amount}" / >
< / li >
< li >
< label > 预警金额< / label >
< input name = "warming_amount" type = "text" class = "txt" placeholder = "预警金额" value = "{$warnInfo.warming_amount}" / >
< / li >
< li >
< label > 预警金额频率< / label >
< input name = "warn_frequency" type = "text" class = "txt" placeholder = "当达到预警值时,每扣除多少流水短信提醒一次" value = "{$warnInfo.warn_frequency}" / >
< / li >
<?php if ($warnInfo['phones']):?>
<?php foreach ($warnInfo['phones'] as $k => $phone):?>
<?php if ($k == 0):?>
< li class = "warn-phone" >
< label > 手机号< / label >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "{$phone}" placeholder = "" >
< button type = "button" class = "bnt_add" > ✚< / button >
< / li >
<?php else:?>
< li class = "warn-phone" >
< label > 通知手机号< / label >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "{$phone}" placeholder = "" >
< button type = "button" class = "bnt_remove" > ✖< / button >
< / li >
<?php endif;?>
<?php endforeach;?>
<?php else:?>
< li class = "warn-phone" >
< label > 手机号< / label >
< input type = "text" class = "txt table_text_input" name = "phones[]" value = "" placeholder = "" >
< button type = "button" class = "bnt_add" > ✚< / button >
< / li >
<?php endif;?>
< li >
< label > < / label > < input type = "submit" id = "submit" value = "确认保存" target-form = "form-horizontal" class = "form_btn ajax-post" >
< / li >
< / ul >
< / form >
< div class = "common_settings" >
< span class = "plus_icon" > < span > < img src = "__IMG__/zwmimages/icon_jia.png" > < / span > < / span >
< form class = "addShortcutIcon" >
< input type = "hidden" name = "title" value = "{$m_title}" >
< input type = "hidden" name = "url" value = "AuthManager/index" >
< / form >
< a class = "ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href = "javascript:;" target-form = "addShortcutIcon" url = "{:U('Think/addShortcutIcon')}" > < img src = "__IMG__/zwmimages/icon_jia.png" > < span > < notempty name = 'commonset' > 已添加< else / > 添加至常用设置< / notempty > < / span > < / a >
< / div >
< / block >
< block name = "script" >
< script type = "text/javascript" >
highlight_subnav('{:U('Game/devide_warn_edit')}');
$(".bnt_add").bind("click",function(){
var a= '< li class = "warn-phone" > < label > 手机号< / label > < input type = "text" class = "txt table_text_input" name = "phones[]" value = "" placeholder = "" > < button type = "button" class = "bnt_remove" > ✖< / button > < / li > ';
$(".warn-phone:last").after(a);
});
$(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove();
});
< / script >
< / block >