<commit_before>﻿@model biz.dfch.CS.Appclusive.UI.Models.Core.Ace
@using biz.dfch.CS.Appclusive.UI.App_LocalResources
@using biz.dfch.CS.Appclusive.UI.Helpers
@{
    bool isCreate = (string)ViewContext.Controller.ControllerContext.RouteData.Values["action"] == "Create";
}
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.HiddenFor(model => model.Id)


    <div class="form-group">
        @Html.LabelFor(model => model.Acl, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.DropDownListFor(model => model.AclId, (IEnumerable<SelectListItem>)ViewBag.AclSelection, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AclId, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.Acl)
            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Type, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.DropDownListFor(model => model.Type, typeof(biz.dfch.CS.Appclusive.UI.Models.Core.AceTypeEnum), new { @class = "form-control" }, true)
            @Html.ValidationMessageFor(model => model.Type, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Permission, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.EditorFor(model => model.PermissionId, "Autocomplete", new { Value = Model.Permission == null ? "" : Model.Permission.Name, SelectUrl = @Url.Action("Select", "Permissions") })
            @Html.ValidationMessageFor(model => model.PermissionId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.TrusteeType, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.DropDownListFor(model => model.TrusteeType, typeof(biz.dfch.CS.Appclusive.UI.Models.Core.TrusteeTypeEnum), new { @class = "form-control", @onchange = "InitTrusteeAuto(this.value);" }, true)
                @Html.ValidationMessageFor(model => model.TrusteeType, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.TrusteeTypeStr)
            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Trustee, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.EditorFor(model => model.TrusteeId, "Autocomplete", new { Value = Model.Trustee == null ? "" : Model.Trustee.Name, SearchTermId = "TrusteeIdSearch", SelectUrl = @Url.Action("Select", Model.TrusteeTypeStr + "s") })
                @Html.ValidationMessageFor(model => model.TrusteeId, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.Trustee)

            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.TextAreaFor(model => model.Description, new { @class = "form-control", @rows = "4" })
            @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <input type="submit" value="@GeneralResources.Save" class="btn btn-primary" />
    </div><commit_msg>Fix error when updating ACE<commit_after>﻿@model biz.dfch.CS.Appclusive.UI.Models.Core.Ace
@using biz.dfch.CS.Appclusive.UI.App_LocalResources
@using biz.dfch.CS.Appclusive.UI.Helpers
@{
    bool isCreate = (string)ViewContext.Controller.ControllerContext.RouteData.Values["action"] == "Create";
}
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.HiddenFor(model => model.Id)


    <div class="form-group">
        @Html.LabelFor(model => model.Acl, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.DropDownListFor(model => model.AclId, (IEnumerable<SelectListItem>)ViewBag.AclSelection, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AclId, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.Acl)
                @Html.HiddenFor(model => model.AclId)
            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Type, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.DropDownListFor(model => model.Type, typeof(biz.dfch.CS.Appclusive.UI.Models.Core.AceTypeEnum), new { @class = "form-control" }, true)
            @Html.ValidationMessageFor(model => model.Type, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Permission, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.EditorFor(model => model.PermissionId, "Autocomplete", new { Value = Model.Permission == null ? "" : Model.Permission.Name, SelectUrl = @Url.Action("Select", "Permissions") })
            @Html.ValidationMessageFor(model => model.PermissionId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.TrusteeType, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.DropDownListFor(model => model.TrusteeType, typeof(biz.dfch.CS.Appclusive.UI.Models.Core.TrusteeTypeEnum), new { @class = "form-control", @onchange = "InitTrusteeAuto(this.value);" }, true)
                @Html.ValidationMessageFor(model => model.TrusteeType, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.TrusteeTypeStr)
                @Html.HiddenFor(model => model.TrusteeType)
            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Trustee, htmlAttributes: new { @class = "control-label" })
        <div>
            @if (isCreate)
            {
                @Html.EditorFor(model => model.TrusteeId, "Autocomplete", new { Value = Model.Trustee == null ? "" : Model.Trustee.Name, SearchTermId = "TrusteeIdSearch", SelectUrl = @Url.Action("Select", Model.TrusteeTypeStr + "s") })
                @Html.ValidationMessageFor(model => model.TrusteeId, "", new { @class = "text-danger" })
            }
            else
            {
                @Html.DisplayFor(model => model.Trustee)
                @Html.HiddenFor(model => model.TrusteeId)
            }
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label" })
        <div>
            @Html.TextAreaFor(model => model.Description, new { @class = "form-control", @rows = "4" })
            @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <input type="submit" value="@GeneralResources.Save" class="btn btn-primary" />
    </div>
{'fraction_non_alphanumeric': 0.16341434215252004, 'fraction_numerical': 0.00023943493355680593, 'mean_word_length': 2.348296593186373, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 120, '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': '7247647', 'n_tokens_mistral': 2611, 'n_tokens_neox': 2517, 'n_words': 439}