password reset fixes

This commit is contained in:
vfedosevich 2015-04-20 03:01:21 -07:00
parent 69b1bc2f16
commit 087697ba7f
18 changed files with 133 additions and 46 deletions

View file

@ -44,7 +44,17 @@ namespace WebsitePanel.WebDavPortal.Controllers
return RedirectToRoute(FileSystemRouteNames.ShowContentPath, new { org = WspContext.User.OrganizationId });
}
return View();
var model = new AccountModel();
var settings = WspContext.Services.System.GetSystemSettings(EnterpriseServer.SystemSettings.WEBDAV_PORTAL_SETTINGS);
if (settings != null)
{
model.PasswordResetEnabled = settings.GetValueOrDefault(EnterpriseServer.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false);
}
return View(model);
}
[HttpPost]

View file

@ -17,5 +17,7 @@ namespace WebsitePanel.WebDavPortal.Models
public string Password { get; set; }
public string LdapError { get; set; }
public bool PasswordResetEnabled { get; set; }
}
}

View file

@ -9,6 +9,7 @@
<br/>
<div class="container row">
<form class="form-horizontal" method="POST" role="form">
@Html.HiddenFor(x=>x.PasswordResetEnabled)
<div class="form-group">
<h3 class="col-sm-offset-1">Sign In</h3>
</div>
@ -33,7 +34,10 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign in</button>
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetEmail)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
@if (Model.PasswordResetEnabled)
{
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetEmail)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
}
</div>
</div>
</form>

View file

@ -28,11 +28,14 @@
<div class="navbar navbar-inverse navbar-fixed-top prevent-deselect">
<div class="container top-container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@if (WspContext.User != null)
{
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
}
<a href="/">
<img class="header-logo processing-dialog" src="@Url.Content("~/Content/Images/logo.png")" />
</a>