<?php
if (!defined("_GNUBOARD_"))
    exit; // 개별 페이지 접근 불가 
/*
 * 회원가입 1단계
 * register.skin.php
 */
?>
<div class="row register1">
    <div class="col-sm-12">
        <h2>회원가입 <small>1단계</small></h2>
        <form name="fregister" method="POST" onsubmit="return fregister_submit(this);" autocomplete="off" class="form-horizontal" role='form'>
            <div class="form-group">
                <label class='col-sm-2'>회원가입약관</label>
                <div class="col-sm-10">
                    <textarea style="width: 98%" rows=10 readonly class='form-control'><?php echo get_text($config['cf_stipulation']) ?></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <div class="checkbox">
                        <input type="radio" value='1' name='agree' id='agree11'> <label for='agree11'>동의합니다.</label>
                    </div>                
                    <div class="checkbox">
                        <input type="radio" value='0' name='agree' id='agree10'> <label for='agree10'>동의하지 않습니다.</label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class='col-sm-2'>개인정보취급방침</label>
                <div class="col-sm-10">
                    <textarea style="width: 98%" rows=10 readonly class='form-control'><?php echo get_text($config['cf_privacy']) ?></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <div class="checkbox">
                        <input type="radio" value='1' name='agree2' id='agree21'> <label for='agree21'>동의합니다.</label>
                    </div>
                    <div class="checkbox">
                        <input type="radio" value='0' name='agree2' id='agree20'> <label for='agree20'>동의하지 않습니다.</label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary">확인</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    function fregister_submit(f)
    {
        var agree1 = document.getElementsByName("agree");
        if (!agree1[0].checked) {
            alert("회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
            agree1[0].focus();
            return false;
        }

        var agree2 = document.getElementsByName("agree2");
        if (!agree2[0].checked) {
            alert("개인정보취급방침의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
            agree2[0].focus();
            return false;
        }

        f.action = "./register_form.php";
        return true;
    }

    if (typeof (document.fregister.mb_name) != "undefined")
        document.fregister.mb_name.focus();
</script>
