
<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>

<div class="main-right-box">

    <h5><?php echo lang_admin('config_question');?></h5>
    <div class="box add-category" id="box">

        <form method="post" name="form1" action="<?php echo uri();?>"
              enctype="multipart/form-data" onsubmit="return returnform(this);">

            <div class="content-eidt-nav pull-right">
                <a id="fullscreen-btn" class="btn btn-default" style="display:none;">
                    <i class="icon-frame"></i>
                    <?php echo lang_admin('container_fluid');?>
                </a>

                <span class="pull-right">

                <input  name="submit" value="1" type="hidden">
                    <button class="btn btn-success" type="submit">
                            <span class="glyphicon glyphicon-floppy-disk"></span> <?php echo lang_admin('preservation');?>
                        </button>

                <a href="#" onclick="gotohome()" data-dataurlname="<?php echo lang_admin('home');?>" class="btn btn-default">
                        <i class="glyphicon glyphicon-trash"></i>
                    </a>

                     <a id="content-eidt-nav-btn" class="btn btn-default" style="display:none;">
                    <i class="icon-close"></i>
</a>
                </span>
            </div>

            <div id="content-eidt-nav"></div>

            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active">
                    <a>
                        {lang_admin('config_question')}
                    </a>
                </li>
            </ul>

            <script type="text/javascript">
                var base_url = '{$base_url}';
            </script>
            <div class="blank30"></div>
            <div class="blank30"></div>
            {loop $data $d}
            <div class="row">
                <div class="col-xs-4 col-sm-4 col-md-3 col-lg-2 text-right">{$d['showname']}</div>
                <div class="col-xs-8 col-sm-7 col-md-7 col-lg-5 text-left">
                    {form::getform($d['name'],$form,$field,array($d['name']=>$d['value']))}
                    {if $d['name']=='crossall_safetycode'}
                    <a href="#" name="cs_crossall" class="btn-navy-sms">{lang_admin('test_cross_domain')}</a>
                    <img src="{$base_url}/images/loading.gif" id="cs_crossall_img" style="display: none"/>
                    {/if}

                </div>
            </div>
            <div class="clearfix blank20"></div>
            {/loop}


            <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 type="text/javascript" src="{$base_url}/common/js/upimg/dialog.js"></script>
<link href="{$skin_admin_path}/css/dialog.css" rel="stylesheet" type="text/css" />

<script>
    $('[name=cs_crossall]').click(function(){
       var user_crossall=$("#user_crossall").val();
        if(user_crossall=="" || user_crossall==undefined){
            alert("{lang_admin('please_enter_user_cross_domain_name')}");
            $("#user_crossall").focus();
            return  false;
        }
       var crossall_safetycode=$("#crossall_safetycode").val();
        if(crossall_safetycode=="" || crossall_safetycode==undefined){
            alert("{lang_admin('please_enter_cross_domain_security_code')}");
            $("#crossall_safetycode").focus();
            return  false;
        }
        $("#cs_crossall_img").attr("style","display: block");
        $.ajax({
            type: "post",
            url: "{url('question/crossall')}",
            data: {"user_crossall": user_crossall, "crossall_safetycode": crossall_safetycode},
            dataType: 'json',
            async: true,
            success: function (data) {
                alert(data.message);
                $("#cs_crossall_img").attr("style","display: none");
            }
        });

    });
</script>

