﻿@model Portal.CMS.Web.Areas.Builder.ViewModels.Container.EditViewModel
@{
    Layout = "";
}

<script type="text/javascript">
    function Delete()
    {
        $('#@Model.ContainerElementId').remove();

        var dataParams = { "pageSectionId": @Model.PageSectionId , "componentId": "@Model.ContainerElementId", "__RequestVerificationToken": $('input[name=__RequestVerificationToken]').val() };

        $('#container-editor-' + @Model.PageSectionId).fadeOut();

        $.ajax({
            data: dataParams,
            type: 'POST',
            cache: false,
            url: '@Url.Action("Delete", "Component", new { area = "Builder" })',
            success: function (data) {
                if (data.State === false)
                {
                    alert("Error: The document has lost synchronisation. Reloading document...");
                    location.reload();
                }
            },
        });
    }
</script>

@using (Html.BeginForm("Edit", "Container", FormMethod.Post))
{
    @Html.AntiForgeryToken()

    @Html.HiddenFor(x => x.PageSectionId)
    @Html.HiddenFor(x => x.ContainerElementId)

    <br />

    <div class="footer">
        <button class="btn primary">Save</button>
        <a onclick="Delete()" data-dismiss="modal" class="btn delete">Delete</a>
        <button class="btn" data-dismiss="modal">Cancel</button>
    </div>
}
﻿@model Portal.CMS.Web.Areas.Builder.ViewModels.Container.EditViewModel
@{
    Layout = "";
}

<script type="text/javascript">
    function Delete()
    {
        $('#@Model.ContainerElementId').remove();

        var dataParams = { "pageSectionId": @Model.PageSectionId , "componentId": "@Model.ContainerElementId", "__RequestVerificationToken": $('input[name=__RequestVerificationToken]').val() };

        $('#container-editor-' + @Model.PageSectionId).fadeOut();

        $.ajax({
            data: dataParams,
            type: 'POST',
            cache: false,
            url: '@Url.Action("Delete", "Component", new { area = "Builder" })',
            success: function (data) {
                if (data.State === false)
                {
                    alert("Error: The document has lost synchronisation. Reloading document...");
                    location.reload();
                }
            },
        });
    }
</script>

    <br />

    <div class="footer">
        <a onclick="Delete()" data-dismiss="modal" class="btn delete">Delete</a>
        <button class="btn" data-dismiss="modal">Cancel</button>
    </div>
Remove form Fields from Container Edit
Remove form Fields from Container Edit
