<style>
    .elput{width: 80%;margin-left: 30px;}
    .elp{padding-left: 30px;}
    .elr{padding-left: 30px;padding-top: 5px;}
</style>
<div class="col-md-10" role="main">
        <div class="bs-example">
            <form action="<?php echo site_url('mocuz/client/savebroke')?>" method="post" class="registerForm regiswidth" enctype="multipart/form-data">
                <div class="form-group">
                    <span class="dianm">数据来源：</span>
                    <div class="examp">
                        <input type="text" class="form-control elput" name="broke_data_source" value="<?php echo $broke_data_source['value'];?>">
                       <p class="elp"><small><i class="fa fa-exclamation-triangle"></i> <strong>说明</strong>: 输入爆料板块调用的版块ID,必填,只能填一个版块。</small></p>
                    </div>
                </div> 
                <div class="form-group">
                    <span class="dianm">爆料版块名称：</span>
                    <div class="examp">
                        <input type="text" class="form-control elput" placeholder="Biu" value="<?php echo $broke_block_name['value']?>" name="broke_block_name">
                        <p class="elp"><small><i class="fa fa-exclamation-triangle"></i> <strong>说明</strong>: 如留空不填写，此处将默认显示Biu</small></p>
                    </div>
                </div>                 
                <div class="form-group">
                    <span class="dianm">最热显示规则：</span>
                    <div class="examp elr">
                        <?php
                            foreach ($show_rules as $v) {  
                        ?>
                                <input type="radio" name="broke_show_rule" value="<?php echo $v;?>" <?php echo $broke_show_rule['value'] == $v?'checked':'';?>/>
                            <?php 
                                echo $v==0?'全局热帖':$v.'天热帖'; 
                            }?>

                    </div>
                </div>                               
                <div class="modal-footer">
                    <button type="submit" class="h5a-btn btn  btn-primary" id="save">保存修改</button>
                </div>
            </form>    
        </div>
    </div>
<script type="text/javascript">
$(function(){
    $('.registerForm').bootstrapValidator({
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh',
            excluded : ':disabled'
        },
        fields: {
            broke_data_source: {
                message: '数据来源',
                validators: {
                    notEmpty: {
                        message: '请输入调用的版块ID'
                    },
                    regexp: {
                        regexp: /^\d+$/i,
                        message: '请输入正确的版块ID',
                    }
                }
            },
            broke_block_name: {
                message: '板块名称',
                validators: {
                    regexp: {
                        regexp: /^(\w|-|[\u4e00-\u9fa5])+$/,
                        message: '请输入正确版块名',
                    }
                }
            }
        }
    })
    .on('success.form.bv',function(e){
            e.preventDefault();         
            var form = this;
            form.submit();
    })
})    
</script>