示例#1
0
        public ActionResult ContactPageUpdate()
        {
            var         key                  = Controller.Content.ContentTypeKey.ContactPageContent;
            ContentData itemToEdit           = controller.GetContentDataByKey(key);
            UpdateHtmlContentViewModel model = new UpdateHtmlContentViewModel()
            {
                Content = HttpUtility.HtmlDecode(itemToEdit != null ? itemToEdit.Value : "<p><br></p>")
            };

            return(View(model));
        }
示例#2
0
        public ActionResult ContactPageUpdate(UpdateHtmlContentViewModel model)
        {
            var jumbotronTextKey = Controller.Content.ContentTypeKey.ContactPageContent;

            string encodedContent = HttpUtility.HtmlEncode(model.Content);

            if (controller.Update(jumbotronTextKey, encodedContent) || controller.ResultManager.IsCorrect)
            {
                NotifyUser(messageOk: "Contenido texto para pagina de contacto editado correctamente");
                return(RedirectToAction("Index"));
            }

            NotifyUser(resultManager: controller.ResultManager);
            return(View(model));
        }