* Fixed login & auth * Added dynamic breadcrumb * Added DOC * Added Patient * Added Notifications * Added Messages * Refactoring api * Re-writed menu * Removed unused things * Created README
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
<ul style="list-style-type:none">
|
|
<li class="user-header">
|
|
<input type="text" id="username" placeholder="username" />
|
|
<input type="password" id="password" placeholder="password" />
|
|
<div>
|
|
<button class="btn-default btn btn-flat" id="login-btn">Login</button>
|
|
</div>
|
|
<p id="msg" class="login-box-msg"></p>
|
|
</li>
|
|
</ul>
|
|
|
|
<script>
|
|
$("#login-btn").on("click", function () {
|
|
var userName = $("#username").val();
|
|
var password = $("#password").val();
|
|
$.ajax({
|
|
url: "/Account/_login",
|
|
data: { UserName: userName, Password: password, RememberMe: false },
|
|
dataType: "json",
|
|
type: "POST",
|
|
success: function (data) {
|
|
var msg = $("#msg");
|
|
if (data.success) {
|
|
window.location.reload();
|
|
} else {
|
|
msg.html(data.message).show();
|
|
$("#user-menu").addClass("open");
|
|
}
|
|
return false;
|
|
},
|
|
error: function (xhr, status, error) {
|
|
alert(xhr.status+" "+xhr.responseText)
|
|
}
|
|
})
|
|
});
|
|
</script>
|