Skip to content

Commit

Permalink
Remove reset password ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JSmith-Aura committed Nov 7, 2024
1 parent 4fe9b3a commit 2961c81
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 59 deletions.
4 changes: 0 additions & 4 deletions application/resources/ui/static/css/mainapp.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
display: none;
}

.reset-password-form {
display: none;
}

input, textarea {
margin-top: 5px;
margin-bottom: 10px;
Expand Down
40 changes: 0 additions & 40 deletions application/resources/ui/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ $("#update_account_button").on("click", function () {
update_account_setings();
});

$("#reset_password_button").on("click", function () {
perform_password_reset();
});

$("#go_back_to_login_form_button").on("click", function () {
hide_password_reset();
});

function show_log_in_prompt() {
$(".login-in-form").fadeIn();
$("#username").select();
Expand Down Expand Up @@ -718,38 +710,6 @@ function show_app() {

}

function show_password_reset() {
$(".bad_password_dialogue").fadeOut();
$(".login-in-form").fadeOut();
$(".reset-password-form").fadeIn();
}

function hide_password_reset() {
$(".login-in-form").fadeIn();
$(".reset-password-form").fadeOut();
}

function perform_password_reset() {
$(".bad_password_dialogue").fadeOut();
show_loading_bar();

var username = $("#reset_password_username").val();

var post_data = {
"username": username,
};

api_request("POST", "/api/password_reset", post_data, function (data) {
hide_loading_bar();
if (data["success"] == true) {
//
} else {
$(".bad_password_dialogue").fadeIn();
$(".bad_password_dialogue").text(data["error"]);
}
})
};

function login() {
$(".bad_password_dialogue").fadeOut();
show_loading_bar();
Expand Down
15 changes: 0 additions & 15 deletions application/resources/ui/templates/mainapp.htm
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,6 @@ <h2 class="panel-title"><b>Log In</b></h2>
</div>
</div>

<div class="reset-password-form main-content">
<div class="panel panel-default login_form">
<div class="panel-heading">
<h2 class="panel-title"><b>Reset Password</b></h2>
</div>
<div class="panel-body">
<label for="reset_password_username">Username</label><br>
<input type="text" id="reset_password_username" class="form-control" name="reset_password_username" placeholder="mandatory" autofocus="">

<button type="button" id="reset_password_button" class="btn btn-primary btn-block">Reset Password</button>
<button type="button" id="go_back_to_login_form_button" class="btn btn-block">Return to Login Page</button>
</div>
</div>
</div>

<div class="xsshunter_application">
<div class="panel">
<ul id="myTab1" class="nav nav-tabs nav-justified">
Expand Down

0 comments on commit 2961c81

Please sign in to comment.