<commit_before>﻿@model CRP.Controllers.ViewModels.ItemViewModel
@using CRP.Core.Resources
@using CRP.Controllers
@using Microsoft.Web.Mvc
@using MvcContrib.FluentHtml


@{
    ViewBag.Title = "Edit Item";
}

<div class="boundary">
    <h2>@ViewBag.Title</h2>

    @Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.")

    <div id="tabs">
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a id="Tab-@StaticValues.Tab_Details" href="#@StaticValues.Tab_Details" data-toggle="tab">Item Details</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Editors" href="#@StaticValues.Tab_Editors" data-toggle="tab">Editors</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Questions" href="#@StaticValues.Tab_Questions" data-toggle="tab">Questions</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Templates" href="#@StaticValues.Tab_Templates" data-toggle="tab">Confirmation Template</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Coupons" href="#@StaticValues.Tab_Coupons" data-toggle="tab">Coupons</a></li>
        </ul>
        <div class="tab-content">
            <div id="@StaticValues.Tab_Details" class="tab-pane active">

                @using (Html.BeginForm("Edit", "ItemManagement", FormMethod.Post, new { @enctype = "multipart/form-data" }))
                {
                    @Html.Partial("ItemForm")
                }

            </div>
            <div id="@StaticValues.Tab_Editors" class="tab-pane">

                @using (Html.BeginForm("AddEditor", "ItemManagement", FormMethod.Post))
                {
                    @Html.AntiForgeryToken()
                    @Html.Hidden("id")
                    <div class="form-group">
                        Add User: @this.Select("userId").Options(Model.Users.OrderBy(a => a.LastName), x => x.Id, x => x.SortableName).FirstOption("--Select a User--")
                        <input type="submit" value="Add User" />
                    </div>
                }

                <table id="table-editors" class="table table-bordered"><commit_msg>Make add user button consistent<commit_after>﻿@model CRP.Controllers.ViewModels.ItemViewModel
@using CRP.Core.Resources
@using CRP.Controllers
@using Microsoft.Web.Mvc
@using MvcContrib.FluentHtml


@{
    ViewBag.Title = "Edit Item";
}

<div class="boundary">
    <h2>@ViewBag.Title</h2>

    @Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.")

    <div id="tabs">
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a id="Tab-@StaticValues.Tab_Details" href="#@StaticValues.Tab_Details" data-toggle="tab">Item Details</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Editors" href="#@StaticValues.Tab_Editors" data-toggle="tab">Editors</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Questions" href="#@StaticValues.Tab_Questions" data-toggle="tab">Questions</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Templates" href="#@StaticValues.Tab_Templates" data-toggle="tab">Confirmation Template</a></li>
            <li role="presentation"><a id="Tab-@StaticValues.Tab_Coupons" href="#@StaticValues.Tab_Coupons" data-toggle="tab">Coupons</a></li>
        </ul>
        <div class="tab-content">
            <div id="@StaticValues.Tab_Details" class="tab-pane active">

                @using (Html.BeginForm("Edit", "ItemManagement", FormMethod.Post, new { @enctype = "multipart/form-data" }))
                {
                    @Html.Partial("ItemForm")
                }

            </div>
            <div id="@StaticValues.Tab_Editors" class="tab-pane">

                @using (Html.BeginForm("AddEditor", "ItemManagement", FormMethod.Post))
                {
                    @Html.AntiForgeryToken()
                    @Html.Hidden("id")
                    <div class="form-group">
                        Add User: @this.Select("userId").Options(Model.Users.OrderBy(a => a.LastName), x => x.Id, x => x.SortableName).FirstOption("--Select a User--")
                        <input type="submit" value="Add User" class="btn btn-primary" />
                    </div>
                }

                <table id="table-editors" class="table table-bordered">
{'fraction_non_alphanumeric': 0.16261261261261262, 'fraction_numerical': 0.0009009009009009009, 'mean_word_length': 2.658154859967051, 'pattern_counts': {'":': 0, '<': 71, '<?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': '2352442', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1284, 'n_words': 217}