mirror of https://github.com/Ombi-app/Ombi
Finished #49
parent
2d016315c7
commit
24781fbd1f
@ -1,9 +1,37 @@
|
||||
<form method="POST">
|
||||
<form method="POST" id="mainForm">
|
||||
<br />
|
||||
Old Password <input class="form-control" name="OldPassword" type="password" />
|
||||
New Password <input class="form-control" name="NewPassword" type="password" />
|
||||
New Password again <input class="form-control" name="NewPasswordAgain" type="password" />
|
||||
<br />
|
||||
<br />
|
||||
<input class="btn btn-success-outline" type="submit" value="Change Password" />
|
||||
<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");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Reference in new issue