mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Improving lost password functionality
--HG-- branch : dev
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset>
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div>
|
||||
<label for="currentPassword">@T("Current password:")</label>
|
||||
@Html.Password("currentPassword")
|
||||
@Html.ValidationMessage("currentPassword")
|
||||
</div>
|
||||
<div>
|
||||
<label for="newPassword">@T("New password:")</label>
|
||||
@Html.Password("newPassword")
|
||||
|
@@ -3,13 +3,14 @@
|
||||
|
||||
@{
|
||||
var userCanRegister = @WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
|
||||
var enableLostPassword = @WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
|
||||
}
|
||||
|
||||
<h1 class="page-title">@Html.TitleForPage(Model.Title)</h1>
|
||||
<p>
|
||||
@T("Please enter your username and password.")
|
||||
@if(userCanRegister) { @Html.ActionLink(T("Register").Text, "Register") @T(" if you don't have an account.") }
|
||||
@Html.ActionLink(T("Lost your Password?").Text, "LostPassword")
|
||||
@if(enableLostPassword) { @Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword") }
|
||||
</p>
|
||||
@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())
|
||||
|
||||
|
@@ -1,15 +1,23 @@
|
||||
<h1>@Html.TitleForPage(T("Lost Password").ToString())</h1>
|
||||
<p>@T("Please enter your username or email address. You will receive a link to create a new password via email.")</p>
|
||||
@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>
|
||||
@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset>
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div>
|
||||
<label for="username">@T("Username or E-mail:")</label>
|
||||
@Html.TextBox("username")
|
||||
@Html.ValidationMessage("username")
|
||||
<label for="newPassword">@T("New password:")</label>
|
||||
@Html.Password("newPassword")
|
||||
@Html.ValidationMessage("newPassword")
|
||||
</div>
|
||||
<div>
|
||||
<button class="primaryAction" type="submit">@T("Send Request")</button>
|
||||
<label for="confirmPassword">@T("Confirm new password:")</label>
|
||||
@Html.Password("confirmPassword")
|
||||
@Html.ValidationMessage("confirmPassword")
|
||||
</div>
|
||||
<div>
|
||||
<button class="primaryAction" type="submit">@T("Change Password")</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
<h1>@Html.TitleForPage(T("Lost Password").ToString())</h1>
|
||||
<p>@T("Please enter your username or email address. You will receive a link to create a new password via email.")</p>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset>
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div>
|
||||
<label for="username">@T("Username or E-mail:")</label>
|
||||
@Html.TextBox("username")
|
||||
@Html.ValidationMessage("username")
|
||||
</div>
|
||||
<div>
|
||||
<button class="primaryAction" type="submit">@T("Send Request")</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
@@ -7,6 +7,11 @@
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersCanRegister)">@T("Users can create new accounts on the site")</label>
|
||||
@Html.ValidationMessage("UsersCanRegister", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.EnableLostPassword)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.EnableLostPassword)">@T("Display a link to enable users to reset their email")</label>
|
||||
@Html.ValidationMessage("EnableLostPassword", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.UsersMustValidateEmail)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersMustValidateEmail)">@T("Users must verify their email address")</label>
|
||||
|
Reference in New Issue
Block a user