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/Ombi.UI/Views/Login/ChangePassword.cshtml

37 lines
1.3 KiB

8 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 />
<input class="btn btn-success-outline" id="save" type="submit" value="Change Password" />
</form>
<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");
}
});
});
});
9 years ago
</script>