Add alert success to creation
This commit is contained in:
@@ -47,6 +47,7 @@ namespace MileageTraker.Web.Controllers
|
||||
{
|
||||
DataService.AddCity(city);
|
||||
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] = "City " + city.Name + " created";
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ namespace MileageTraker.Web.Controllers
|
||||
|
||||
DataService.AddLog(log);
|
||||
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] = "Log created";
|
||||
|
||||
if (TempData.ContainsKey("FuelLogId"))
|
||||
@@ -172,6 +173,7 @@ namespace MileageTraker.Web.Controllers
|
||||
DataService.UpdateFuelLog(fuelLog);
|
||||
|
||||
// return to the fuel log match page
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] = "Log created and matched to the fuel log";
|
||||
return RedirectToAction("Match", "FuelLog", new {id = fuelLogId});
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace MileageTraker.Web.Controllers
|
||||
|
||||
if (viewModel.SetPassword)
|
||||
{
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] = "User " + user.Username + " created";
|
||||
return RedirectToAction("SetPassword", new { id = user.UserId });
|
||||
}
|
||||
@@ -148,6 +149,7 @@ namespace MileageTraker.Web.Controllers
|
||||
var resetPasswordUrl = ResetPassword(user);
|
||||
email.SendInitializePassword(user, resetPasswordUrl);
|
||||
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] = "User " + user.Username + " created, invitation sent to " + user.Email;
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
@@ -269,8 +271,8 @@ namespace MileageTraker.Web.Controllers
|
||||
}
|
||||
if (user.Username == User.Identity.Name)
|
||||
{
|
||||
TempData["StatusMessage"] = "Cannot disable yourself!";
|
||||
TempData["StatusMessage-Type"] = "alert-error";
|
||||
TempData["StatusMessage"] = "Cannot disable yourself!";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user