Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.7 KB
Raw Blame
@model DocumentModel
<div asp-validation-summary="All"></div>
<input asp-for="Id" type="hidden"/>
<input asp-for="CustomerId" type="hidden"/>

<input id="active-menu-item" type="hidden" value="/@Constants.AreaAdmin/Document/List"/>

<admin-tabstrip name="document-edit">
    <items>
        <tabstrip-item text="@Loc["Admin.Documents.Document.Info"]" tab-index="0">
            <content>
                <div>
                    <partial name="Partials/CreateOrUpdateDocument.TabInfo" model="Model"/>
                </div>
            </content>
        </tabstrip-item>
        <tabstrip-item text="@Loc["Admin.Documents.Document.Account"]" tab-index="1">
            <content>
                <div>
                    <partial name="Partials/CreateOrUpdateDocument.Account" model="Model"/>
                </div>
            </content>
        </tabstrip-item>
        <tabstrip-item text="@Loc["Admin.Common.UserFields.Tab"]" tab-index="2">
            <content>
                <div>
                    <partial name="Partials/UserFields" model="Model"/>
                </div>
            </content>
        </tabstrip-item>
        <vc:admin-widget widget-zone="document_details_tabs" additional-data="Model"/>
    </items>
</admin-tabstrip>

<script>
    $(document).ready(function () {
        $("#@Html.IdFor(model => model.ReferenceId)").change(toggleReferenceType);
        toggleReferenceType();


        function toggleReferenceType() {
            var selectedReferenceId = $("#@Html.IdFor(model => model.ReferenceId)").val();
            if (selectedReferenceId == @(((int)Reference.None).ToString())) {
                $('.object-reference').hide();
            } else {
                $('.object-reference').show();
            }
        }

    });
</script>