@using QuickForm
@model QuickFormModel

@{
    bool IsDeletionPermitted;
    string ErrorMessage;
    QuickFormProjectDelete.CheckIsDeletionPermitted(Session, Model, out IsDeletionPermitted, out ErrorMessage);
}

@if (IsDeletionPermitted)
{ 
    using (Html.BeginForm(Model.ActionNameDelete, Model.ControllerName)) {
        <fieldset>
    
            <table class="table table-form">
        
            <tr>
                <td colspan="2">
                    <h3>Вы действительно хотите удалить данные @Model.DataTypeName_ForDelete "@Model.CurrentDeleteMessage"?</h3>
                </td>
            </tr>

            @Html.Partial(QuickFormData.Control_SaveButton, Model)

            </table>    
    
        </fieldset>
    }
}
else
{
    <table class="table table-form">

        <tr>
            <td>
                <h3>@ErrorMessage</h3>
            </td>
        </tr>

        <tr align="center">
            <td>
                @Html.ActionLink("Отменить", "Index", Model.CurrentResetFormRouteValue, new { @class = "btn btn-primary btn-form-height" })
            </td>
        </tr>

    </table>
}