
<style type="text/css">
    @media(max-width:468px) {
        input#title {width:100%;}
        .add-category .text-left {margin:0px; padding:0px 5px;}
    }
    span.hotspot {float:right; padding-left:10px;}

</style>
<!--编辑器-->
<script type="text/javascript" src="{$base_url}/wangeditor/release/wangEditor.min.js"></script>
<script type="text/javascript" src="{$base_url}/common/js/xss/xss.js"></script>
<div class="main-right-box">


    <div class="box add-category" id="box">
        <div class="blank30"></div>
        <form method="post" name="form1" action="<?php echo uri();?>"
              enctype="multipart/form-data" onsubmit="return checkform(this);">
            <input type="hidden" name="onlymodify" value=""/>


            <script type="text/javascript">
                var base_url = '{$base_url}';
            </script>

            <div class="row">
                <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{lang_admin('title')}</div>
                <div class="col-xs-8 col-sm-7 col-md-7 col-lg-5 text-left">
                    {form::getform('title',$form,$field,$data)}
                    <span class="tips icon-info" data-toggle="tooltip" data-html="ture" data-placement="right" title="{lang_admin('title')}"></span>
                </div>
            </div>
            <div class="clearfix blank20"></div>
            <div class="row">
                <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{lang_admin('bounty')}</div>
                <div class="col-xs-6 col-sm-6 col-md-6 col-lg-4 text-left">
                    {form::getform('rewardmenoy',$form,$field,$data)}
                    <span class="tips icon-info" data-toggle="tooltip" data-html="ture" data-placement="right" title="{lang_admin('bounty')}"></span>
                </div>
            </div>
            <div class="clearfix blank20"></div>
            <div class="row">       
	             <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{lang_admin('special')}</div>
                <div class="col-xs-8 col-sm-7 col-md-7 col-lg-5 text-left">
                    {form::getform('typeid',$form,$field,$data)}
                    <span class="tips icon-info" data-toggle="tooltip" data-html="ture" data-placement="right" title="{lang_admin('special')}"></span>
                </div>
            </div>
            <div class="clearfix blank20"></div>
            <div class="row">
	             <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{lang_admin('topping')}</div>
                <div class="col-xs-8 col-sm-7 col-md-7 col-lg-5 text-left">
                    {form::getform('topping',$form,$field,$data)}
                    <span class="tips icon-info" data-toggle="tooltip" data-html="ture" data-placement="right" title="{lang_admin('special')}"></span>
                </div>
            </div>
            <div class="clearfix blank20"></div>

            <div class="row">
                <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{lang_admin('content')}</div>
                <div class="col-xs-8 col-sm-8 col-md-9 col-lg-10 text-left">
                    {form::getform('content',$form,$field,$data)}

                </div>
            </div>
            <div class="clearfix blank20"></div>


            <div class="blank30"></div>
            <div class="line"></div>
            <div class="blank30"></div>
            <div class="row">
                <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">
                </div>
                <div class="col-xs-12 col-sm-7 col-md-7 col-lg-5 text-left">
                    <input  name="submit" value="1" type="hidden">
                    <input type="submit"   value=" {lang_admin('submitted')} "   class="btn btn-primary btn-lg" />
                </div>
            </div>
        </form>

    </div>

    <div class="blank30"></div>
</div>

<script>
    function  checkform(obj) {
        if($("#typeid").val()=="" ) {
            alert("{lang('please_choose')}{lang('type')}");
            $("#type").focus();
            return false;
        }
        if($("#title").val()=="" ) {
            alert("{lang('title')}{lang('on_null')}");
            $("#title").focus();
            return false;
        }
        var filterHtml = filterXSS(editor_content.txt.html());  // 此处进行 xss 攻击过滤
        filterHtml = filterHtml.replace(new RegExp("&lt;","g"), "<");
        filterHtml = filterHtml.replace(new RegExp("&gt;","g"), ">");
        $('[name=content]').val(filterHtml);

        returnform(obj);
        return  false;

    }
</script>