<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <title></title>
    <style></style>
    <script src="{{ theme }}/js/jquery.min.js"></script>
    <script src="{{ theme }}/js/jquery.validate.js"></script>
    <script src="{{ theme }}/js/public.js"></script>
    <script>
        $(document).ready(function () {
            var date = new Date().Format('yyyy-MM-dd');
            $('#date').val(date);
            $('#viewForm').validate({
                rules: {
                    time: 'required'
                },
                messages: {
                    time: '请选择时间'
                },
                errorPlacement: function(error, element) {
                    error.appendTo('body');
                }
            });
            {% if message %}
                alert('{{ message }}');
            {% endif %}
        });
    </script>
</head>
<body>
<form id="viewForm" method="post">
    <div>
        <p>今天</p>
        <input type="radio" name="time" id="js" value="0"/><label for="js">上午</label>
        <input type="radio" name="time" id="jz" value="1"/><label for="jz">中午</label>
        <input type="radio" name="time" id="jx" value="2"/><label for="jx">下午</label>
    </div>
    <div>
        <p>明天</p>
        <input type="radio" name="time" id="ms" value="3"/><label for="ms">上午</label>
        <input type="radio" name="time" id="mz" value="4"/><label for="mz">中午</label>
        <input type="radio" name="time" id="mx" value="5"/><label for="mx">下午</label>
    </div>
    <div>
        <p>后天</p>
        <input type="radio" name="time" id="hs" value="6"/><label for="hs">上午</label>
        <input type="radio" name="time" id="hz" value="7"/><label for="hz">中午</label>
        <input type="radio" name="time" id="hx" value="8"/><label for="hx">下午</label>
    </div>
    <div>
        <p><label for="date">指定时间</label></p>

        <p><input type="date" name="date" id="date"></p>
        <input type="radio" name="time" id="zs" value="9"/><label for="zs">上午</label>
        <input type="radio" name="time" id="zz" value="10"/><label for="zz">中午</label>
        <input type="radio" name="time" id="zx" value="11"/><label for="zx">下午</label>
    </div>

    <p class="submit">
        <input type="submit" id="view_submit" value="提交">
    </p>
</form>
</body>
</html>