{% load staticfiles %}
<!DOCTYPE html>
<html lang="ko">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Smart 사이즈 추천 시스템</title>
        <link rel="apple-touch-icon" href="{% static 'measurement/size_recommend/images/Aicon.png' %}" /><!--아이폰 바로가기 아이콘--><!--권장-->
        <link rel="shortcut icon" href="{% static 'measurement/size_recommend/images/Aicon.png' %}" /><!--안드로이드폰 바로가기 아이콘--><!--권장-->
        <link rel="stylesheet" type="text/css" href="{% static 'measurement/size_recommend/css/size_common.css' %}">
        <link rel="stylesheet" type="text/css" href="{% static 'base/css/jquery-confirm.min.css' %}">
</head>
<body>
    <div class="sizeWrap">
        <article>
        	<div class="sub1Wrap">
	        	<div class="modelVisualWrap">
	        		<img src="{% static 'measurement/size_recommend/images/visualmodel2.jpg' %}">
	        	</div>
	            <div class="sub1FormWrap">
	                <form id="body-information" method="post" action="{% url 'measurement:size_recommend:body_information_save' kindergartener.id %}">
                        {% csrf_token %}
	                    <label>키</label>
	                    <input type="number" name="height" value="{% if kindergartener.height %}{{ kindergartener.height }}{% endif %}"><span>cm</span><br/>
	                    <label>몸무게</label>
	                    <input type="number" name="weight" value="{% if kindergartener.weight %}{{ kindergartener.weight }}{% endif %}"><span>Kg</span><br/>
	                    <label>허리둘레</label>
	                    <input type="number" name="waist" value="{% if kindergartener.waist %}{{ kindergartener.waist }}{% endif %}"><span>cm</span><br/>
	                    <label>어깨둘레</label>
	                    <input type="number" name="shoulder" value="{% if kindergartener.shoulder %}{{ kindergartener.shoulder }}{% endif %}"><span>cm</span><br/>
	                </form>
	                <div class="preBtn">
	                    <a href="{% url 'measurement:size_recommend:intro_update' kindergartener.id %}">
	                        <img src="{% static 'measurement/size_recommend/images/BtnPre.png' %}">
	                    </a>
	                </div>
	                <div class="nextBtn">
	                    <a href="#" onclick="bodyInformationSaveSubmin(); return false;">
	                        <img src="{% static 'measurement/size_recommend/images/BtnNext.png' %}">
	                    </a>
	                </div>
	            </div>
            </div>
        </article>
    </div>
</body>
 <script src="{% static 'measurement/size_recommend/js/jquery-1.12.3.min.js' %}"></script>
 <script src="{% static 'measurement/size_recommend/js/common.js' %}"></script>
 <script type="text/javascript" src="{% static 'base/js/jquery-confirm.min.js' %}"></script>
 <script type="text/javascript">
    var bodyInformationSaveSubmin = function (){

        var form = document.getElementById("body-information")
        if((!form['height'].value)||(!form['weight'].value)||(!form['waist'].value)||(!form['shoulder'].value)) {
            $.alert({title: 'Alert!', content: "정보를 입력해주세요", useBootstrap: false});
        }else{
            document.getElementById("body-information").submit();
        }

    }
 </script>
</html>