Updates MembershipHelper to not change the email/name if the value has not changed. Updates the templates to show only validation summaries for their own values/prefixes. Fixes some underlying MVC methods that merge view state to ensure the prefixes work with validation summaries properly when not showing property level errors. Updates the Umb controllers to add model level validation msgs when failed.
This commit is contained in:
@@ -14,24 +14,16 @@
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
|
||||
var success = TempData["ProfileUpdateSuccess"] != null;
|
||||
|
||||
}
|
||||
|
||||
@*NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed*@
|
||||
@Html.RenderJsHere()
|
||||
|
||||
@if (Members.IsLoggedIn())
|
||||
{
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
Html.RequiresJs("/umbraco_client/ui/jquery.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
|
||||
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
|
||||
|
||||
var success = TempData["ProfileUpdateSuccess"] != null;
|
||||
|
||||
@*NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed*@
|
||||
@Html.RenderJsHere()
|
||||
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
// This message will show if RedirectOnSucces is set to false (default)
|
||||
@@ -43,7 +35,7 @@
|
||||
<fieldset>
|
||||
<legend>Edit profile</legend>
|
||||
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.ValidationSummary("profileModel", true)
|
||||
|
||||
@Html.LabelFor(m => profileModel.Name)
|
||||
@Html.TextBoxFor(m => profileModel.Name)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.ValidationSummary("loginModel", true)
|
||||
|
||||
@Html.LabelFor(m => loginModel.Username)
|
||||
@Html.TextBoxFor(m => loginModel.Username)
|
||||
|
||||
@@ -58,8 +58,8 @@ else
|
||||
{
|
||||
<fieldset>
|
||||
<legend>Register Member</legend>
|
||||
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@Html.ValidationSummary("registerModel", true)
|
||||
|
||||
@Html.LabelFor(m => registerModel.Name)
|
||||
@Html.TextBoxFor(m => registerModel.Name)
|
||||
|
||||
Reference in New Issue
Block a user