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

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

    @Html.HiddenFor(x => x.SettingId)

    @Html.ValidationMessage("SettingName")

    <div class="control-group float-container">
        @Html.LabelFor(x => x.SettingName)

        @if (Model.SettingName != "Website Name")
        {
            @Html.TextBoxFor(x => x.SettingName, new { placeholder = "Setting Name" })
        }
        else
        {
            @Html.TextBoxFor(x => x.SettingName, new { placeholder = "Setting Name", @readonly="true" })
        }
    </div>

    <div class="control-group float-container">
        @Html.LabelFor(x => x.SettingValue)
        @Html.TextBoxFor(x => x.SettingValue, new { placeholder = "Setting Value" })
    </div>

    <br />

    <div class="footer">
        <button class="btn primary">Save</button>
        @if (Model.SettingName != "Website Name")
        {
            <a href="@Url.Action("Delete", "Settings", new { settingId = Model.SettingId })" class="btn delete">Delete</a>
        }
        <button class="btn" data-dismiss="modal">Cancel</button>
    </div>
}
﻿@model Portal.CMS.Web.Areas.Admin.ViewModels.Settings.EditViewModel
@{
    Layout = "";
}

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

    @Html.HiddenFor(x => x.SettingId)

    @Html.ValidationMessage("SettingName")

    <div class="control-group float-container">
        @Html.LabelFor(x => x.SettingName)
        @Html.TextBoxFor(x => x.SettingName, new { placeholder = "Setting Name" })
    </div>

    <div class="control-group float-container">
        @Html.LabelFor(x => x.SettingValue)
        @Html.TextBoxFor(x => x.SettingValue, new { placeholder = "Setting Value" })
    </div>

    <br />

    <div class="footer">
        <button class="btn primary">Save</button>
        <a href="@Url.Action("Delete", "Settings", new { settingId = Model.SettingId })" class="btn delete">Delete</a>
        <button class="btn" data-dismiss="modal">Cancel</button>
    </div>
}
Remove ViewLogic Validation on Edit Settings Screen
Remove ViewLogic Validation on Edit Settings Screen
