fix fields not found in forms
This commit is contained in:
@@ -12,8 +12,5 @@ AccountInventory.cs
|
||||
ProjectMistData.cs
|
||||
Data inside the sql doesnt match what is inside the database
|
||||
|
||||
account/resetpassword
|
||||
make the account your resetting password for visible in ui
|
||||
|
||||
ForgotPassword Email / Resetpassword Email
|
||||
Needs styles that match the theme of the website
|
||||
@@ -55,8 +55,8 @@
|
||||
ReturnURL = string.IsNullOrEmpty(ReturnURL) ? "/" : ReturnURL;
|
||||
ErrorMsgs = new List<string>();
|
||||
|
||||
if(UserName != null ) {
|
||||
if(Password != null ) {
|
||||
if( !string.IsNullOrEmpty(UserName) ) {
|
||||
if( !string.IsNullOrEmpty(Password) ) {
|
||||
if (Password.Length >= 6 ) {
|
||||
HttpResponseMessage TestLogin = await Http.PostAsJsonAsync("api/account/login", new MistoxWebsite.Shared.Account(){ UserName = UserName, PasswordHash = Password, EmailVerified = StayLoggedIn });
|
||||
string result = await TestLogin.Content.ReadAsStringAsync();
|
||||
|
||||
@@ -75,10 +75,10 @@
|
||||
|
||||
ErrorMsgs = new List<string>();
|
||||
|
||||
if (Email != null){
|
||||
if ( !string.IsNullOrEmpty(Email) ){
|
||||
if( CheckEmail( Email ) ) {
|
||||
if(UserName != null ) {
|
||||
if(Password != null ) {
|
||||
if( !string.IsNullOrEmpty(UserName) ) {
|
||||
if( !string.IsNullOrEmpty(Password) ) {
|
||||
if (Password.Length >= 6 ) {
|
||||
HttpResponseMessage TestRegister = await Http.PostAsJsonAsync("api/account/register", new Account(){
|
||||
UserName = UserName,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<form class="center big-frame background-border">
|
||||
<h3>Reset Password</h3>
|
||||
<span>User: @UserName</span>
|
||||
<h2>User: @UserName</h2>
|
||||
<div class="frame-item">
|
||||
<input type="password" placeholder=" " @bind="NewPassword" @onkeyup="OnKeyDown" />
|
||||
<label>New Password</label>
|
||||
@@ -50,6 +50,8 @@
|
||||
|
||||
protected async Task TryChange() {
|
||||
Result = "Waiting on response from server";
|
||||
if (NewPassword.Length >= 6){
|
||||
if (NewPassword != RepeatPassword){
|
||||
HttpResponseMessage TestLogin = await Http.PostAsJsonAsync("api/account/resetpassword", new Account(){ UserName = UserName, PasswordHash = NewPassword, Error = ResetPwd });
|
||||
string result = await TestLogin.Content.ReadAsStringAsync();
|
||||
bool success = result == "true" ? true : false;
|
||||
@@ -60,6 +62,12 @@
|
||||
}else{
|
||||
Result = "Something is wrong";
|
||||
}
|
||||
}else{
|
||||
Result = "Passwords must match";
|
||||
}
|
||||
}else{
|
||||
Result = "Password must be at least 6 Characters long";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user