<commit_before>﻿@model ABCP

<panel class="panel">
    <div class="panel-heading">
        <h1>ABCP for @Html.DisplayFor(model => model.Soldier) on @Html.DisplayFor(model => model.Date)</h1>
    </div>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        @Html.HiddenFor(model => model.Id)

        <table>
            <thead>
                <tr>
                    <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Waist)</th>
                    <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Neck)</th>
                    @if (Model.Soldier.Gender == Gender.Female)
                    {
                        <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Hips)</th>
                    }
                </tr>
            </thead>

            @for (int i = 0; i < 3; i++)
            {
                <tr>
                    <td><input name="measurements[@i].Waist" /></td>
                    <td><input name="measurements[@i].Neck" /></td>
                    @if (Model.Soldier.Gender == Gender.Female)
                    {
                        <td><input name="measurements[@i].Hips" /></td>
                    }
                </tr>
            }
        </table>

        <button type="submit">Save</button>
    }
</panel><commit_msg>Fix for editing measurements<commit_after>﻿@model ABCP

@{
    if(!Model.Measurements.Any())
    {
        Model.Measurements = new[]
        {
            new ABCP.Measurement{ },
            new ABCP.Measurement{ },
            new ABCP.Measurement{ }
        };
    }
}

<panel class="panel">
    <div class="panel-heading">
        <h1>ABCP for @Html.DisplayFor(model => model.Soldier) on @Html.DisplayFor(model => model.Date)</h1>
    </div>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        @Html.HiddenFor(model => model.Id)

        <table>
            <thead>
                <tr>
                    <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Waist)</th>
                    <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Neck)</th>
                    @if (Model.Soldier.Gender == Gender.Female)
                    {
                        <th>@Html.DisplayNameFor(model => model.Measurements.FirstOrDefault().Hips)</th>
                    }
                </tr>
            </thead>

            @for (int i = 0; i < Model.Measurements.Count(); i++)
            {
                <tr>
                    <td><input name="measurements[@i].Waist" value="@Model.Measurements.ElementAt(i).Waist" /></td>
                    <td><input name="measurements[@i].Neck" value="@Model.Measurements.ElementAt(i).Neck" /></td>
                    @if (Model.Soldier.Gender == Gender.Female)
                    {
                        <td><input name="measurements[@i].Hips" value="@Model.Measurements.ElementAt(i).Hips" /></td>
                    }
                </tr>
            }
        </table>

        <button type="submit">Save</button>
    }
</panel>
{'fraction_non_alphanumeric': 0.1566031643525993, 'fraction_numerical': 0.0022602518566354536, 'mean_word_length': 1.4784, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2554470', 'n_tokens_mistral': 953, 'n_tokens_neox': 879, 'n_words': 130}