@using GreenTree.Nachtragsmanagement.Web.Extensions
@model GreenTree.Nachtragsmanagement.Web.Models.Appendix.CategoryDataModel
@Html.DevExpress().PopupControl(s =>
{
s.Name = "devPopupControlEditCategory";
if (Model.Id == -1)
s.HeaderText = "Neue Kategorie erstellen";
else
s.HeaderText = "\"" + Model.Description + "\" bearbeiten";
s.Modal = true;
s.Width = new Unit(250, UnitType.Pixel);
s.CloseAction = CloseAction.CloseButton;
s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
s.AllowDragging = false;
s.AllowResize = false;
s.ShowFooter = false;
s.ShowOnPageLoad = true;
s.SetContent(() =>
{
using (Html.BeginForm("EditCategory", "Appendix", FormMethod.Post, new { id = "categoryEditForm" }))
{
ViewContext.Writer.Write("
");
ViewContext.Writer.Write("");
ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Description, "Beschreibung:"));
ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Description).ToHtmlString());
Html.DevExpress().TextBoxFor(m => m.Description, t =>
{
t.Width = new Unit(100, UnitType.Percentage);
}).Render();
ViewContext.Writer.Write("
");
Html.RenderPartial(
"~/Views/Shared/_PopupButtonPanel.cshtml",
new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
{
PopupName = "devPopupControlEditCategory",
AcceptFunction = "function (s, e) { saveCategory(); }"
}
);
}
});
s.Styles.Content.Paddings.Padding = new Unit(0);
s.Styles.ModalBackground.Opacity = 0;
}).GetHtml()