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.
110 lines
6.3 KiB
110 lines
6.3 KiB
{layout name="public/layout" /}
|
|
<style>
|
|
.control-label{line-height:2.8em;}
|
|
input[type=radio]{margin-top:2px;}
|
|
</style>
|
|
<ol class="breadcrumb" style="margin-top:10px">
|
|
<li><a href="{:url('activity/index')}">活动</a></li>
|
|
<li class="active">{$activity.title}</li>
|
|
<li><a href="{:url('activity/index')}">返回</a></li>
|
|
</ol>
|
|
{if condition="$activity['pic']"}<div class="leftside"><img src="{:SITE_PATH}{$activity.pic}" width="100%"/></div>{/if}
|
|
<br/>
|
|
<div class="infor">{$activity.infor|htmlspecialchars_decode}</div>
|
|
<br/>
|
|
{if condition="$activity['state'] eq 1"}
|
|
<h3 class="text-center" style="margin-top:10px;margin-bottom:15px">申请表</h3>
|
|
<form class="form-horizontal container" id="postForm" method="post" action="{:url('detail',['id'=>$id])}">
|
|
{:token()}
|
|
{volist name="apply" id="vo"}
|
|
<div class="form-group">
|
|
{switch $vo['ftype']}
|
|
{case value="input"}
|
|
<div class="col-xs-3 control-label">{$vo.fname}</div>
|
|
<div class="col-xs-9"><input type="text" name="{$vo.ftag}" id="{$vo.ftag}" class="form-control"></div>
|
|
{/case}
|
|
{case value="radio"}
|
|
<div class="col-xs-3 control-label">{$vo.fname}</div>
|
|
<div class="col-xs-9">
|
|
{volist name="vo['foptions']" id="jo" key="jey"}
|
|
<div class="radio" style="display:inline-block;">
|
|
<label>
|
|
<input type="radio" name="{$vo.ftag}" id="{$vo.ftag}{$jey}" value="{$jey}" {if condition="$jey eq 1"}checked{/if}> {$jo}
|
|
</label>
|
|
</div>
|
|
{/volist}
|
|
</div>
|
|
{/case}
|
|
{case value="checkbox"}
|
|
<div class="col-xs-3 control-label">{$vo.fname}</div>
|
|
<div class="col-xs-9">
|
|
{volist name="vo['foptions']" id="jo" key="jey"}
|
|
<div class="radio" style="display:inline-block;">
|
|
<label>
|
|
<input type="radio" name="{$vo.ftag}" id="{$vo.ftag}{$jey}" value="{$jey}" {if condition="$jey eq 1"}checked{/if}> {$jo}
|
|
</label>
|
|
</div>
|
|
{/volist}
|
|
</div>
|
|
{/case}
|
|
{case value="textarea"}
|
|
<div class="col-xs-3 control-label">{$vo.fname}</div>
|
|
<div class="col-xs-9">
|
|
<textarea rows="3" name="{$vo.ftag}" id="{$vo.ftag}" class="form-control" style="overflow: hidden; overflow-wrap: break-word; height: 66px;" placeholder="{$vo.fnotice}"></textarea>
|
|
</div>
|
|
{/case}
|
|
{case value="select"}
|
|
<div class="col-xs-3 control-label">{$vo.fname}</div>
|
|
<div class="col-xs-9">
|
|
<select name="{$vo.ftag}" id="ptype1" class="form-control">
|
|
<option value="">选择{$vo.fname}</option>
|
|
{volist name="vo['foptions']" id="jo" key="jey"}
|
|
<option value="{$jey}">{$jo}</option>
|
|
{/volist}
|
|
</select>
|
|
</div>
|
|
{/case}
|
|
{/switch}
|
|
</div>
|
|
{/volist}
|
|
<br/>
|
|
<div class="row text-center">
|
|
<div class="col-xs-12">
|
|
<button type="submit" class="btn btn-danger" style="width:80%">提交</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{/if}
|
|
<br/>
|
|
{if condition="$activity['notice'] "}
|
|
<div class="remark">
|
|
<div class="label">备注:</div>
|
|
<div class="txt">{$activity.notice|htmlspecialchars_decode}</div>
|
|
</div>
|
|
{/if}
|
|
<script src="{$yf_theme_path}public/js/jquery-2.1.4.js"></script>
|
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script>
|
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script>
|
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script>
|
|
<script src="{$yf_theme_path}public/js/base.js"></script>
|
|
<script>
|
|
var rules={{volist name="apply" id="vo"}{if condition="$vo['frequire'] eq 1"}"{$vo.ftag}":"required",{/if}{/volist}};
|
|
{if condition="$activity['state'] neq 1"}
|
|
$("#activityPage .head .title",parent.document).css('opacity',0);
|
|
{else}
|
|
$("#activityPage .head .title",parent.document).css('opacity',1);
|
|
{/if}
|
|
var messages={{volist name="apply" id="vo"}{if condition="$vo['frequire'] eq 1"}"{$vo.ftag}":"{$vo.fname}{switch $vo['ftype']}{case value='raido|checkbox'}必选{/case}{case value='file'}必上传{/case}{default/}必填{/switch}",{/if}{/volist}};
|
|
tool.commonForm("#postForm",rules,messages,tool.tipError,'',function(data){
|
|
if(data.code==0){
|
|
$("input[name='__token__']").val(data.data.token);
|
|
}
|
|
if(data.code==1){
|
|
$('#activityPage',parent.document).hide();
|
|
$('#activityMsg',parent.document).css({"visibility":"visible"});
|
|
$('#activityMsg',parent.document).animate({"opacity":1});
|
|
}else{
|
|
tool.msg(data.msg);
|
|
}
|
|
});
|
|
</script>
|