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.
120 lines
7.0 KiB
120 lines
7.0 KiB
{layout name="public/layout" /}
|
|
<div id="actwraper">
|
|
<div class="title">活动介绍:</div>
|
|
{if condition="$activity['banner']"}<div class="leftside"><img src="{:SITE_PATH}{$activity.banner}" width="100%"/></div>{/if}
|
|
<div class="infor">{$activity.infor|htmlspecialchars_decode}</div>
|
|
<div class="form">
|
|
<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" autocomplete="off"></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:60%">提交报名信息</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<br/>
|
|
{if condition="$activity['notice'] "}
|
|
<div class="remark">
|
|
<div class="topic">备注:</div>
|
|
<div class="txt">{$activity.notice|htmlspecialchars_decode}</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="shadow"></div>
|
|
<div id="msg">
|
|
<img src="{$yf_theme_path}/public/img/msgbg.png" width="100%">
|
|
<div class="wraper">
|
|
<div class="txt success">
|
|
<p>您已成功提交活动报名信息</p>
|
|
<p>可前往个人中心查看报名状态</p>
|
|
</div>
|
|
<div class="txt error">
|
|
<p>您已成功提交活动报名信息</p>
|
|
<p>可前往个人中心查看报名状态</p>
|
|
</div>
|
|
<div class="btn">
|
|
<a href="javascript:void(0);">确 认</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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){
|
|
$("#msg,.shadow,#msg .success").show();
|
|
}else{
|
|
$("#msg .error").html(data.msg);
|
|
$("#msg,.shadow,#msg .error").show();
|
|
}
|
|
});
|
|
$("#msg .btn a").click(function(){
|
|
$("#msg,.shadow,#msg .txt").hide();
|
|
});
|
|
</script>
|