mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
MOre work
This commit is contained in:
parent
65087642e1
commit
2f5db03815
7 changed files with 112 additions and 8 deletions
|
@ -16,4 +16,5 @@ If you have not yet created an Admin account you can do here: <a href="/register
|
|||
<button type="button" class="close" data-dismiss="alert"><i class="fa fa-times"></i></button>
|
||||
Invalid Username or Password!
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,44 @@
|
|||
<form method="POST">
|
||||
Username <input class="form-control" type="text" name="Username"/>
|
||||
<form method="POST" id="loginForm">
|
||||
<label>
|
||||
Username</label> <input class="form-control" type="text" name="Username"/>
|
||||
<br/>
|
||||
Password <input class="form-control" name="Password" type="password"/>
|
||||
@if (Model.UsePassword)
|
||||
{
|
||||
<label> Password </label>
|
||||
<input class="form-control" name="Password" type="password"/>
|
||||
}
|
||||
<br/>
|
||||
<input class="btn btn-success" type="submit" value="Login"/>
|
||||
</form>
|
||||
<input id="loginBtn" class="btn btn-success" type="submit" value="Login"/>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#loginBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#loginForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
window.location.replace("/search");
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue