@using GreenTree.Nachtragsmanagement.Web.Extensions
@model GreenTree.Nachtragsmanagement.Web.Models.Config.ConfigItemDataModel
@Html.DevExpress().PopupControl(s =>
{
s.Name = "devPopupControlEditConfigItem";
if (Model.Id == -1)
s.HeaderText = "Neue Einstellung erstellen";
else
{
if (Model.Name.Length > 40)
s.HeaderText = "\"" + Model.Name.Substring(0, 15) + " ... " + Model.Name.Substring(Model.Name.Length - 15, 15) + "\" bearbeiten";
}
s.Modal = true;
s.Width = new Unit(500, UnitType.Pixel);
s.CloseAction = CloseAction.CloseButton;
s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
s.PopupVerticalAlign = PopupVerticalAlign.TopSides;
s.PopupVerticalOffset = 20;
s.AllowDragging = false;
s.AllowResize = false;
s.ShowFooter = false;
s.ShowOnPageLoad = true;
s.SetContent(() =>
{
using (Html.BeginForm("EditConfigItem", "Deviation", FormMethod.Post, new { id = "configItemEditForm" }))
{
ViewContext.Writer.Write("
");
Html.RenderPartial(
"~/Views/Shared/_PopupButtonPanel.cshtml",
new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
{
PopupName = "devPopupControlEditConfigItem",
AcceptFunction = "function (s, e) { saveConfigItem(); }"
}
);
}
});
s.Styles.Content.Paddings.Padding = new Unit(0);
s.Styles.ModalBackground.Opacity = 0;
}).GetHtml()