Formatting for new users

This commit is contained in:
2020-08-18 21:06:08 -04:00
parent 9f654822f8
commit e9211c6ace
6 changed files with 37 additions and 11 deletions
+3 -2
View File
@@ -21,8 +21,7 @@ namespace LeafWeb.WebCms.Controllers
if (member == null)
{
TempData["StatusMessage"] = $"Sorry, verification was not found. Please try to register again, or use Contact Us to resolve the issue.";
TempData["StatusMessage"] = "Sorry, verification was not found. Please try to register again, or use Contact Us to resolve the issue.";
TempData["StatusMessage-Type"] = "alert-danger";
}
else if (member.IsApproved)
@@ -57,6 +56,8 @@ namespace LeafWeb.WebCms.Controllers
$"Thank you! Your email is now verified at {member.Email}, use your password to login.";
TempData["StatusMessage-Type"] = "alert-success";
logger.InfoFormat($"User {member.Email} verified.");
redirectUrl = "membership/login";
}
}
+12 -2
View File
@@ -13,7 +13,18 @@
var user = Membership.GetUser();
}
@if (user == null)
{
<div class="row justify-content-center mb-4">
<div class="col-auto text-light bg-secondary p-2">
New!
<a href="/membership/register" class="text-white">
Register
a LeafWeb <i class="fa fa-leaf" style="color: rgb(172, 214, 118)"></i> account
</a>
</div>
</div>
}
<div class="container-lg">
<div class="row justify-content-center">
<div class="col-md-8 card card-body bg-light">
@@ -63,7 +74,6 @@
</div>
</form>
@using (Html.BeginUmbracoForm<LeafInputController>("Submit", null, new { id = "create" }))
{
@Html.EditorFor(m => m.PhotosynthesisType)
@@ -12,7 +12,7 @@
<div class="col-lg-4 card card-body bg-light">
@using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
{
@Html.EditorFor(m => loginModel.Username)
@Html.EditorFor(m => loginModel.Username, new {labelText = "Email"})
@Html.EditorFor(m => loginModel.Password, "PasswordWithForgotLink")
@Html.ValidationSummary("loginModel", true)
@@ -42,11 +42,11 @@ else
{
@Html.ValidationSummary(false)
@Html.EditorFor(m => registerModel.Name)
@Html.EditorFor(m => registerModel.Name, new {labelText = "User Email"})
@Html.EditorFor(m => registerModel.Email, new { type = "email"})
@Html.EditorFor(m => registerModel.Password, "Password")
<div class="form-group verifyPassword">
@Html.Label("VerifyPassword")
@Html.Label("Verify Password")
@Html.Password("VerifyPassword", null, new { @class = "form-control" })
@Html.ValidationMessage("VerifyPassword", "", new { @class = "text-danger" })
</div>
+1 -1
View File
@@ -83,7 +83,7 @@
</div>
</header>
<main role="main" class="mb-3">
<main role="main" class="mb-5">
@Html.Partial("_StatusMessage")
@RenderBody()
@@ -10,9 +10,24 @@
{
groupClass = string.Concat(groupClass, " ", ViewBag.groupClass);
}
var labelText = string.Empty;
if (ViewBag.labelText != null)
{
labelText = ViewBag.labelText;
}
}
<div class="@groupClass">
@Html.LabelForModel()
@if (!string.IsNullOrEmpty(labelText))
{
@Html.LabelForModel(labelText)
}
else
{
@Html.LabelForModel()
}
@RenderBody()
@Html.ValidationMessage(string.Empty, new { @class = "text-danger"})
</div>
@Html.ValidationMessage(string.Empty, new { @class = "text-danger" })
</div>