Esempio n. 1
0
        public ActionResult Signature(SignatureViewModel model)
        {
            if (!model.Preview.HasValue)
            {
                CurrentUser.UserProfile.Signature = model.Signature;
                CurrentUser.UserProfile.ParsedSignature = _parseServices.ParseBBCodeText(model.Signature);
                _userServices.UpdateSignature(CurrentUser.UserID, model.Signature);
                SetSuccess("Signature Saved");
            }
            else
            {
                TempData["Preview_ParsedSignature"] = _parseServices.ParseBBCodeText(model.Signature);
                TempData["Preview_Signature"] = model.Signature;
            }

            return RedirectToSelf();
        }
Esempio n. 2
0
        public ActionResult Signature()
        {
            SetBreadCrumb("Signature");

            var userProfile = CurrentUser.UserProfile;
            var model = new SignatureViewModel()
            {
                ParsedSignature = userProfile.ParsedSignature,
                Signature = userProfile.Signature
            };

            if (TempData.ContainsKey("Preview_Signature"))
            {
                model.Preview = true;
                model.PreviewParsedSignature = (string)TempData["Preview_ParsedSignature"];
                model.Signature = (string)TempData["Preview_Signature"];
            }

            return View(model);
        }