1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
- <input type="hidden" name="id" value="{$group['id']}" />
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button data-dismiss="modal" class="close" type="button">×</button>
- <h4 class="modal-title"><?php if( !empty($group['id'])){ ?>编辑<?php }else{ ?>添加<?php } ?>标签组</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label class="col-sm-2 control-label must">等级</label>
- <div class="col-sm-9 col-xs-12">
- <select name="level" class="form-control">
- <option value="1" <?php if( !empty($group['level']) && $group['level'] == 1){ ?> selected<?php } ?>>1</option>
- <option value="2" <?php if( !empty($group['level']) && $group['level'] == 2){ ?> selected<?php } ?>>2</option>
- <option value="3" <?php if( !empty($group['level']) && $group['level'] == 3){ ?> selected<?php } ?>>3</option>
- <option value="4" <?php if( !empty($group['level']) && $group['level'] == 4){ ?> selected<?php } ?>>4</option>
- <option value="5" <?php if( !empty($group['level']) && $group['level'] == 5){ ?> selected<?php } ?>>5</option>
- <option value="6" <?php if( !empty($group['level']) && $group['level'] == 6){ ?> selected<?php } ?>>6</option>
- <option value="7" <?php if( !empty($group['level']) && $group['level'] == 7){ ?> selected<?php } ?>>7</option>
- <option value="8" <?php if( !empty($group['level']) && $group['level'] == 8){ ?> selected<?php } ?>>8</option>
- <option value="9" <?php if( !empty($group['level']) && $group['level'] == 9){ ?> selected<?php } ?>>9</option>
- <option value="10" <?php if( !empty($group['level']) && $group['level'] == 10){ ?> selected<?php } ?>>10</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label must">等级名称</label>
- <div class="col-sm-9 col-xs-12">
- <input type="text" name="levelname" class="form-control" value="{$group['levelname']}" data-rule-required="true" />
- </div>
-
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label must">等级折扣</label>
- <div class="col-sm-9 col-xs-12">
- <input type="text" name="discount" class="form-control" value="{$group['discount']}" data-rule-required="true" />
- <div class="help-block">请填写1-99的<span style="color:red">整数</span>,100不打折。例如:80,打八折,该会员对应等级会员价=商品现价*80%</div>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-2 control-label ">升级方式</label>
- <div class="col-sm-9 col-xs-12" style="margin-top:7px;">
-
- <label>
- <input type='radio' name='is_auto_grade' value='0' <?php if( empty($group) || $group['is_auto_grade'] ==0 ){ ?>checked <?php } ?> /> 手动
- </label>
- <label>
- <input type='radio' name='is_auto_grade' value='1' <?php if( !empty($group) && $group['is_auto_grade'] ==1 ){ ?>checked <?php } ?> /> 自动
- </label>
- </div>
- </div>
- <div class="form-group" id="level_money" <?php if( empty($group) || $group['is_auto_grade'] ==0 ){ ?>style="display:none;" <?php } ?>>
- <label class="col-sm-2 control-label must">等级升级金额</label>
- <div class="col-sm-9 col-xs-12">
- <input type="text" name="level_money" class="form-control" value="{$group['level_money']}" />
- </div>
- </div>
-
- </div>
- <div class="modal-footer">
- <button class="btn btn-primary" type="submit">提交</button>
- <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
- </div>
- </div>
- </div>
- </form>
- <script>
- $(function(){
- $('input[name=is_auto_grade]').click(function(){
- var is_auto_grade = $(this).val();
-
- if( is_auto_grade == 1 )
- {
- $('#level_money').show();
- }else{
- $('#level_money').hide();
- }
-
- })
- })
- </script>
|