| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- @using GreenTree.Nachtragsmanagement.Web.Extensions
- @model GreenTree.Nachtragsmanagement.Web.Models.Appendix.StateDataModel
- <div class="claimEditContainer">
-
- <script>
- function saveState() {
- var form = $("#statusEditForm");
- $(form).submit(function (e) {
- $.ajax({
- type: "POST",
- url: '@Url.Action("EditState", "Appendix")',
- data: form.serialize(),
- success: function (response) {
- setTimeout(function () {
- $(".claimEditContainer").remove();
- if (response == "success") {
- parent.callCustomEventListener('StateDataCallbackEventReceiver');
- } else {
- $("body").append(response);
- }
- }, 200);
- }
- });
- e.preventDefault();
- });
- form.submit();
- }
- </script>
- @Html.DevExpress().PopupControl(s =>
- {
- s.Name = "devPopupControlEditState";
- if (Model.Id == -1)
- s.HeaderText = "Neuen NT-Status 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("EditState", "Appendix", FormMethod.Post, new { id = "statusEditForm" }))
- {
- ViewContext.Writer.Write("<div class='editFormWrapper'>");
- ViewContext.Writer.Write("<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />");
- 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("</div>");
- Html.RenderPartial(
- "~/Views/Shared/_PopupButtonPanel.cshtml",
- new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
- {
- PopupName = "devPopupControlEditState",
- AcceptFunction = "function (s, e) { saveState(); }"
- }
- );
- }
- });
- s.Styles.Content.Paddings.Padding = new Unit(0);
- s.Styles.ModalBackground.Opacity = 0;
- }).GetHtml()
- </div>
|