Update 20210528 - mit LoginPopup
This commit is contained in:
5
App/Views/Shared/Components/Menuitems/MenuItems.cshtml
Normal file
5
App/Views/Shared/Components/Menuitems/MenuItems.cshtml
Normal file
@@ -0,0 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<ejs-menu id="menu" items="ViewBag.menuItems"></ejs-menu>
|
||||
5
App/Views/Shared/Components/UserStatus/UserStatus.cshtml
Normal file
5
App/Views/Shared/Components/UserStatus/UserStatus.cshtml
Normal file
@@ -0,0 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
Ich bin der User-Status
|
||||
@@ -1,4 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
@using Syncfusion.EJ2
|
||||
@model APP.Models.LoginModel
|
||||
@{
|
||||
var defaultanimation = new Syncfusion.EJ2.Popups.DialogAnimationSettings { Effect = Syncfusion.EJ2.Popups.DialogEffect.Zoom };
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -6,39 +11,102 @@
|
||||
<title>@ViewData["Title"] - sf1</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
<link rel ="stylesheet" href="~/css/ej2/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/ej2/bootstrap.css" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
|
||||
<script src="~/js/ej2/ej2.min.js"></script>
|
||||
<script src="~/js/ej2/ej2.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<nav class="navbar navbar-dark navbar-expand-lg fixed-top bg-white portfolio-navbar gradient">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">sf1</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="navbar-brand logo" href="#">BWPM</a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navbarNav"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
@(await Component.InvokeAsync("MenuItems"))
|
||||
@*<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link active" href="index.html">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="projects-grid-cards.html">Projects</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="cv.html">CV</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="hire-me.html">Hire me</a></li>
|
||||
</ul>*@
|
||||
</div>
|
||||
</div>
|
||||
<button id="btnclick" type="button">Login</button>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
<style>
|
||||
.popup {
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
<div id="mycontainer" class="popup" style="display:none">
|
||||
<ejs-dialog id="default_dialog" width="500px" target="#mycontainer" showCloseIcon="true" header="Berufwahl-Parcours-Manager Login">
|
||||
<e-content-template>
|
||||
<form method="post" action="/Login/login">
|
||||
<div class="col-12 form-item">
|
||||
<input class="e-input" placeholder="UserName" name="UserName">
|
||||
</div>
|
||||
<div class="col-12 form-item">
|
||||
<div class="e-input-group">
|
||||
<input class="e-input" placeholder="Password" type="password" name="password">
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<button class="e-btn" type="submit"> Login </button>
|
||||
</div>
|
||||
</form>
|
||||
</e-content-template>
|
||||
</ejs-dialog>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
window.onload = function () {
|
||||
document.getElementById('btnclick').onclick = function () {
|
||||
var cont = document.getElementById("mycontainer");
|
||||
cont.style.display = "block";
|
||||
var dialog = document.getElementById("default_dialog").ej2_instances[0];
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
document.getElementById('sendButton').onclick = function (e) {
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
$.post(this.action, $(this).serialize(), function (response) {
|
||||
if (response.error) {
|
||||
alert(response.error);
|
||||
}
|
||||
else {
|
||||
var dialog = document.getElementById("default_dialog").ej2_instances[0];
|
||||
dialog.hide();
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© @DateTime.Now.Year - sf1 - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
|
||||
14
App/Views/Shared/_UserStatus.cshtml
Normal file
14
App/Views/Shared/_UserStatus.cshtml
Normal file
@@ -0,0 +1,14 @@
|
||||
@{
|
||||
var ut = APP.Models.SessionClass.UserName;
|
||||
string funktion = "";
|
||||
if (ut == "")
|
||||
{
|
||||
@:Login
|
||||
}
|
||||
else
|
||||
{
|
||||
@:Logout
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user