<commit_before>﻿@model Joinzjazure.Models.ApplicationForm

@using Joinzjazure.Helpers;

@{
    ViewBag.Title = "湛江一中IT社 网络报名系统";
}

<div class="alert alert-info">
    <p>除以下各小组成员外，湛江一中IT社还招收以下人员：</p>
    <p>社长1名，副社长2名。</p>
    <p>各小组组长2名。</p>
    <p>有意参与的同学请在报名表“其他信息”部分说明，或者与现任社长联系。</p>
</div>

@using (Html.BeginForm())
{

    <div class="row">
        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Name)
            <span class="label label-info">必填</span>
            @Html.EditorFor(m => m.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(m => m.Name, null, new { @class = "text-warning" })
        </div>

        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Gender)
            <span class="label label-info">必填</span>
            @Html.DropDownListFor(m => m.Gender, new SelectList(new[] { new { Text = "汉子", Value = true }, new { Text = "妹纸", Value = false } }, "Value", "Text"),
new { @class = "form-control" })
        </div>
        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Grade)
            <span class="label label-info">必填</span>
            @Html.DropDownListFor(m => m.Grade, new SelectList(new[] { new { Text = "高一", Value = GradeYearHelper.GetYear(1) }, new { Text = "高二", Value = GradeYearHelper.GetYear(2) } }, "Value", "Text"),
new { @class = "form-control" })
        </div>

        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Class)
            <span class="label label-info">必填</span>
            @Html.EditorFor(m => m.Class, new { htmlAttributes = new { @class = "form-control", placeHolder = "1 - 42" } })
            @Html.ValidationMessageFor(m => m.Class, null, new { @class = "text-warning" })
        </div>
    </div>
    <div class="form-group">
        <label>小组</label>
        <span class="label label-info">点击小组名称查看小组介绍</span>
        @Html.HiddenFor(m => m.Groups)
        <div class="panel-group">
            @{
                var groups = Joinzjazure.Data.GroupXmlStore.GetAll();
                var colIndex = new Random().Next(0, groups.Count);
            }
            @foreach (var g in groups)
            {
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <input type="checkbox" id="@g.Id" name="@g.Id" value="@g.Value" onclick="handleCheck('#@g.Id',@g.Value)" />
                            <a data-toggle="collapse" class="info" data-parent="#accordion" href="@string.Format("#collapse{0}", @g.Id)">@g.Name</a>
                        </h4>
                    </div>
                    @{
                        string styleClass = "panel-collapse collapse";
                        if (groups.IndexOf(g) == colIndex)
                        {
                            styleClass = "panel-collapse collapse in";
                        }
                    }
                    <div id="@string.Format("collapse{0}", @g.Id)" class="@styleClass">
                        <div class="panel-body">
                            @foreach (var line in g.Lines)
                            {
                                <p>@line</p>
                            }
                        </div>
                    </div>
                </div>

                        }
            @Html.ValidationMessageFor(m => m.Groups, null, new { @class = "text-warning" })
        </div>
    </div>
                        <div class="row">
                            <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                @Html.LabelFor(m => m.Email)
                                <span class="label label-info">必填</span>
                                @Html.EditorFor(m => m.Email, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(m => m.Email, null, new { @class = "text-warning" })
                            </div>

                            <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                @Html.LabelFor(m => m.Phone)
                                @Html.EditorFor(m => m.Phone, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(m => m.Phone, null, new { @class = "text-warning" })
                            </div>

                            <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                @Html.LabelFor(m => m.QQ)
                                @Html.EditorFor(m => m.QQ, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(m => m.QQ, null, new { @class = "text-warning" })
                            </div>

                            <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                @Html.LabelFor(m => m.Weibo)
                                @Html.EditorFor(m => m.Weibo, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(m => m.Weibo, null, new { @class = "text-warning" })
                            </div>
                        </div>

                        <div class="form-group">
                            @Html.LabelFor(m => m.Description)
                            @Html.TextAreaFor(m => m.Description, new { @class = "form-control", rows = "5" })
                            @Html.ValidationMessageFor(m => m.Description, null, new { @class = "text-warning" })
                        </div>

                        <div class="form-group">
                            <label>验证码</label>
                            @{
                                var code = new Joinzjazure.Controllers.HomeController().GetVerificationCode();
                            }
                            <button id="RefreshQ" type="button" class="btn btn-sm btn-link">换个问题</button>
                            <p id="ValQ">@code.Question</p>
                            @Html.HiddenFor(m => m.VerificationCodeId)
                            @Html.EditorFor(m => m.VerificationCodeAnswer, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(m => m.VerificationCodeAnswer, null, new { @class = "text-warning" })
                            <script>
                                $('#RefreshQ').click(function () {
                                    $.getJSON('/Home/GetVerificationCodeAjax', function (data) {
                                        $("#ValQ").text(data.Question);
                                        $('#VerificationCodeId').val(data.Id);
                                    });
                                });
                                $('#VerificationCodeId').val('@code.Id');
                            </script>
                        </div>
                                <button type="submit" class="btn btn-info">提交报名表</button>
                                <button type="reset" class="btn btn-link">重新填写</button>

                                }<commit_msg>added year info in grade selection<commit_after>﻿@model Joinzjazure.Models.ApplicationForm

@using Joinzjazure.Helpers;

@{
    ViewBag.Title = "湛江一中IT社 网络报名系统";
}

<div class="alert alert-info">
    <p>除以下各小组成员外，湛江一中IT社还招收以下人员：</p>
    <p>社长1名，副社长2名。</p>
    <p>各小组组长2名。</p>
    <p>有意参与的同学请在报名表“其他信息”部分说明，或者与现任社长联系。</p>
</div>

@using (Html.BeginForm())
{

    <div class="row">
        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Name)
            <span class="label label-info">必填</span>
            @Html.EditorFor(m => m.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(m => m.Name, null, new { @class = "text-warning" })
        </div>

        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Gender)
            <span class="label label-info">必填</span>
            @Html.DropDownListFor(m => m.Gender, new SelectList(new[] { new { Text = "汉子", Value = true }, new { Text = "妹纸", Value = false } }, "Value", "Text"),
new { @class = "form-control" })
        </div>
        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Grade)
            <span class="label label-info">必填</span>
            @{
                var g1 = GradeYearHelper.GetYear(1);
                var g2 = GradeYearHelper.GetYear(2);
            }
            @Html.DropDownListFor(m => m.Grade, new SelectList(new[] { new { Text = "高一(" + g1.ToString() + "年入学)", Value = g1 }, new { Text = "高二(" + g2.ToString() + "年入学)", Value = g2 } }, "Value", "Text"),
new { @class = "form-control" })
        </div>

        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
            @Html.LabelFor(m => m.Class)
            <span class="label label-info">必填</span>
            @Html.EditorFor(m => m.Class, new { htmlAttributes = new { @class = "form-control", placeHolder = "1 - 42" } })
            @Html.ValidationMessageFor(m => m.Class, null, new { @class = "text-warning" })
        </div>
    </div>
                <div class="form-group">
                    <label>小组</label>
                    <span class="label label-info">点击小组名称查看小组介绍</span>
                    @Html.HiddenFor(m => m.Groups)
                    <div class="panel-group">
                        @{
                            var groups = Joinzjazure.Data.GroupXmlStore.GetAll();
                            var colIndex = new Random().Next(0, groups.Count);
                        }
                        @foreach (var g in groups)
                        {
                            <div class="panel panel-primary">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <input type="checkbox" id="@g.Id" name="@g.Id" value="@g.Value" onclick="handleCheck('#@g.Id',@g.Value)" />
                                        <a data-toggle="collapse" class="info" data-parent="#accordion" href="@string.Format("#collapse{0}", @g.Id)">@g.Name</a>
                                    </h4>
                                </div>
                                @{
                                    string styleClass = "panel-collapse collapse";
                                    if (groups.IndexOf(g) == colIndex)
                                    {
                                        styleClass = "panel-collapse collapse in";
                                    }
                                }
                                <div id="@string.Format("collapse{0}", @g.Id)" class="@styleClass">
                                    <div class="panel-body">
                                        @foreach (var line in g.Lines)
                                        {
                                            <p>@line</p>
                                        }
                                    </div>
                                </div>
                            </div>

                                    }
                        @Html.ValidationMessageFor(m => m.Groups, null, new { @class = "text-warning" })
                    </div>
                </div>
                                    <div class="row">
                                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                            @Html.LabelFor(m => m.Email)
                                            <span class="label label-info">必填</span>
                                            @Html.EditorFor(m => m.Email, new { htmlAttributes = new { @class = "form-control" } })
                                            @Html.ValidationMessageFor(m => m.Email, null, new { @class = "text-warning" })
                                        </div>

                                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                            @Html.LabelFor(m => m.Phone)
                                            @Html.EditorFor(m => m.Phone, new { htmlAttributes = new { @class = "form-control" } })
                                            @Html.ValidationMessageFor(m => m.Phone, null, new { @class = "text-warning" })
                                        </div>

                                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                            @Html.LabelFor(m => m.QQ)
                                            @Html.EditorFor(m => m.QQ, new { htmlAttributes = new { @class = "form-control" } })
                                            @Html.ValidationMessageFor(m => m.QQ, null, new { @class = "text-warning" })
                                        </div>

                                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                                            @Html.LabelFor(m => m.Weibo)
                                            @Html.EditorFor(m => m.Weibo, new { htmlAttributes = new { @class = "form-control" } })
                                            @Html.ValidationMessageFor(m => m.Weibo, null, new { @class = "text-warning" })
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        @Html.LabelFor(m => m.Description)
                                        @Html.TextAreaFor(m => m.Description, new { @class = "form-control", rows = "5" })
                                        @Html.ValidationMessageFor(m => m.Description, null, new { @class = "text-warning" })
                                    </div>

                                    <div class="form-group">
                                        <label>验证码</label>
                                        @{
                                            var code = new Joinzjazure.Controllers.HomeController().GetVerificationCode();
                                        }
                                        <button id="RefreshQ" type="button" class="btn btn-sm btn-link">换个问题</button>
                                        <p id="ValQ">@code.Question</p>
                                        @Html.HiddenFor(m => m.VerificationCodeId)
                                        @Html.EditorFor(m => m.VerificationCodeAnswer, new { htmlAttributes = new { @class = "form-control" } })
                                        @Html.ValidationMessageFor(m => m.VerificationCodeAnswer, null, new { @class = "text-warning" })
                                        <script>
                                            $('#RefreshQ').click(function () {
                                                $.getJSON('/Home/GetVerificationCodeAjax', function (data) {
                                                    $("#ValQ").text(data.Question);
                                                    $('#VerificationCodeId').val(data.Id);
                                                });
                                            });
                                            $('#VerificationCodeId').val('@code.Id');
                                        </script>
                                    </div>
                                            <button type="submit" class="btn btn-info">提交报名表</button>
                                            <button type="reset" class="btn btn-link">重新填写</button>

                                            }
{'fraction_non_alphanumeric': 0.13859341759479415, 'fraction_numerical': 0.007133024652734326, 'mean_word_length': 1.0671236420072425, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 108, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2629407', 'n_tokens_mistral': 4321, 'n_tokens_neox': 4240, 'n_words': 761}