#17191 Return the Register page as a ShapeResult

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2011-01-31 17:54:12 -08:00
parent 758e6c5e08
commit ce1d3b31c4
5 changed files with 8 additions and 6 deletions

View File

@@ -99,7 +99,8 @@ namespace Orchard.Users.Controllers {
ViewData["PasswordLength"] = MinPasswordLength;
return View();
var shape = _orchardServices.New.Register();
return new ShapeResult(this, shape);
}
[HttpPost]
@@ -135,7 +136,8 @@ namespace Orchard.Users.Controllers {
}
// If we got this far, something failed, redisplay form
return Register();
var shape = _orchardServices.New.Register();
return new ShapeResult(this, shape);
}
public ActionResult RequestLostPassword() {

View File

@@ -89,7 +89,7 @@
<Content Include="Views\Account\ChallengeEmailSuccess.cshtml" />
<Content Include="Views\Account\ChallengeEmailSent.cshtml" />
<Content Include="Views\Account\ChallengeEmailFail.cshtml" />
<Content Include="Views\Account\Register.cshtml" />
<Content Include="Views\Register.cshtml" />
<Content Include="Views\Admin\Edit.cshtml" />
<Content Include="Views\Admin\Create.cshtml" />
<Content Include="Views\Admin\Index.cshtml" />

View File

@@ -1,7 +1,7 @@
@model dynamic
<h1>@Html.TitleForPage(T("Change Password").ToString()) </h1>
<p>@T("Use the form below to change your password.")</p>
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string) </p>
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"]) </p>
@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())
@using (Html.BeginFormAntiForgeryPost()) {
<fieldset>

View File

@@ -1,7 +1,7 @@
@model dynamic
<h1>@Html.TitleForPage(T("Change Password").ToString()) </h1>
<p>@T("Use the form below to change your password.")</p>
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string) </p>
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"]) </p>
@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())
@using (Html.BeginFormAntiForgeryPost()) {
<fieldset>

View File

@@ -1,6 +1,6 @@
<h1>@Html.TitleForPage(T("Create a New Account").ToString())</h1>
<p>@T("Use the form below to create a new account.")</p>
<p>@T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)</p>
<p>@T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"])</p>
@Html.ValidationSummary(T("Account creation was unsuccessful. Please correct the errors and try again.").ToString())
@using (Html.BeginFormAntiForgeryPost()) {
<fieldset>