@using GreenTree.Nachtragsmanagement.Web.Models.Global; @{ Layout = "~/Views/Shared/_FunctionLayout.cshtml"; } @model IEnumerable @Html.DevExpress().PopupControl(s => { s.Name = "devPopupControlDeleteRole"; s.HeaderText = "\"{role}\" löschen"; s.Modal = false; s.Width = new Unit(350, UnitType.Pixel); s.CloseAction = CloseAction.CloseButton; s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter; s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter; s.AllowDragging = false; s.AllowResize = false; s.ShowFooter = false; s.SetContent(() => { ViewContext.Writer.Write("
"); ViewContext.Writer.Write("Falls Sie \"{role}\" löschen möchten, was soll mit den Benutzern geschehen, die sich bereits in dieser Rolle befinden?"); ViewContext.Writer.Write("
"); ViewContext.Writer.Write("
"); Html.DevExpress().RadioButton(rb => { rb.Name = "devRadioButtonDeleteReplaceRole"; rb.Text = "Eine neue Rolle zuweisen"; rb.GroupName = "roleDelete"; rb.Properties.ClientSideEvents.CheckedChanged = "function (s, e) { " + "devComboBoxRoleDeleteReplaceRole.SetEnabled(s.GetChecked()); " + "}"; }).Render(); Html.DevExpress().ComboBox(cb => { cb.Name = "devComboBoxRoleDeleteReplaceRole"; cb.Width = new Unit(100, UnitType.Percentage); cb.Properties.ValueType = typeof(int); cb.Properties.ValueField = "Id"; cb.Properties.TextField = "Description"; cb.SelectedIndex = 0; cb.ClientEnabled = false; }).BindList(ViewData["AllRoles"]).Render(); Html.DevExpress().RadioButton(rb => { rb.Name = "devRadioButtonDeleteRemoveRole"; rb.Text = "Benutzer aus der Rolle entfernen"; rb.GroupName = "roleDelete"; rb.Checked = true; rb.Properties.ClientSideEvents.CheckedChanged = "function (s, e) { " + "devComboBoxRoleDeleteReplaceRole.SetEnabled(!s.GetChecked()); " + "}"; }).Render(); ViewContext.Writer.Write("
"); Html.RenderPartial( "~/Views/Shared/_PopupButtonPanelYesNo.cshtml", new YesNoDialogModel { PopupName = "devPopupControlDeleteRole", YesFunction = "function (s, e) { deleteRole(); }" } ); }); s.Styles.Content.Paddings.Padding = new Unit(0, UnitType.Pixel); }).GetHtml() @Html.Partial("~/Views/Admin/Roles/_RoleGridPartial.cshtml", Model)