You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/PlexRequests.UI/Views/Login/ChangePassword.cshtml

37 lines
1.3 KiB

9 years ago
<form method="POST" id="mainForm">
<br />
Old Password <input class="form-control form-control-custom" name="OldPassword" type="password" /><br />
New Password <input class="form-control form-control-custom" name="NewPassword" type="password" /><br />
New Password again <input class="form-control form-control-custom" name="NewPasswordAgain" type="password" />
<br />
<br />
9 years ago
<input class="btn btn-success-outline" id="save" type="submit" value="Change Password" />
</form>
9 years ago
<script>
$(function () {
$('#save').click(function (e) {
e.preventDefault();
var $form = $("#mainForm");
$.ajax({
type: $form.prop("method"),
data: $form.serialize(),
url: $form.prop("action"),
dataType: "json",
success: function (response) {
if (response.result === true) {
generateNotify(response.message, "success");
} else {
generateNotify(response.message, "warning");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
}
});
});
});
</script>