mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Finished #49
This commit is contained in:
parent
2d016315c7
commit
24781fbd1f
11 changed files with 166 additions and 31 deletions
|
@ -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>
|
|
@ -72,9 +72,9 @@
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Admin <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/admin">Settings</a></li>
|
||||
<li><a href="#">User Management</a></li>
|
||||
<li><a href="/changepassword">Change password</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Logout</a></li>
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue