Passwortsicherheit.cs leserlicher gestaltet. MoK: An Passwortänderung weitergearbeitet (nur in Debug sichtbar).
495 lines
20 KiB
Plaintext
495 lines
20 KiB
Plaintext
@using BeWoPlanerMobil.Controllers
|
|
@using BeWoPlanerMobil.Models
|
|
@using BeWoPlanerMobil.Service
|
|
@using BeWoPlanerMobil.Util
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
|
<meta content="utf-8" http-equiv="encoding">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0" id="viewport" />
|
|
<title>@ViewBag.Title</title>
|
|
|
|
<script defer src="~/Content/fontawesome/all.min.js"></script>
|
|
|
|
<!--
|
|
Einbindereihenfolge der Skripte für Bootstrap:
|
|
1. jQuery
|
|
2. Popper
|
|
3. Bootstrap
|
|
-->
|
|
|
|
<link href="@Url.Content("~/node_modules/jquery-ui/dist/themes/base/jquery-ui.min.css")" rel="stylesheet" type="text/css" />
|
|
|
|
@Html.DevExpress().GetStyleSheets(
|
|
ASPxWebClientUIControl.ColorSchemeLight,
|
|
new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout, Theme = "Default" },
|
|
new StyleSheet { ExtensionSuite = ExtensionSuite.Report },
|
|
new StyleSheet { ExtensionType = ExtensionType.WebDocumentViewer }
|
|
)
|
|
|
|
<script type="text/javascript" src="@Url.Content("~/node_modules/jquery/dist/jquery.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/node_modules/jquery-ui/dist/jquery-ui.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/node_modules/jquery-validation/dist/jquery.validate.min.js")"></script>
|
|
<script type="text/javascript" src="@Url.Content("~/node_modules/knockout/build/output/knockout-latest.js")"></script>
|
|
|
|
@Html.DevExpress().GetScripts(
|
|
new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
|
|
new Script { ExtensionSuite = ExtensionSuite.Icons },
|
|
new Script { ExtensionType = ExtensionType.WebDocumentViewer }
|
|
)
|
|
|
|
<script type="text/javascript" src="@Url.Content("~/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js")"></script>
|
|
|
|
<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />
|
|
<link rel="stylesheet" href="@Url.Content("~/Content/tempusdominus-bootstrap-4.min.css")" />
|
|
|
|
<script src="@Url.Content("~/Scripts/utils/dateUtils.js")" type="text/javascript"></script>
|
|
|
|
<script src="@Url.Content("~/Scripts/moment.min.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/locale/de.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/tempusdominus-boostrap-4.min.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/mobileUtils.js")" type="text/javascript"></script>
|
|
|
|
<script src="@Url.Content("~/Scripts/group-booking.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/view-scripts/main.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/signature.js")" type="text/javascript"></script>
|
|
|
|
|
|
<script src="@Url.Content("~/Scripts/support-concept-statistics.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/view-scripts/customer.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/view-scripts/scheduler.js")" type="text/javascript"></script>
|
|
|
|
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/view-scripts/report.js")"></script>
|
|
<script src="@Url.Content("~/node_modules/signature_pad/dist/signature_pad.umd.min.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/trimCanvas.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/resources-list-utils.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/list-utils.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/service-record-time-calc.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/js-helper.js")" type="text/javascript"></script>
|
|
<script src="@Url.Content("~/Scripts/utils/logging.js")" type="text/javascript"></script>
|
|
|
|
<script>
|
|
window.addEventListener("error", (event) => {
|
|
hideSpinner();
|
|
|
|
var textToShow = "Message: " + event.message + "\r\n" +
|
|
"File name: " + event.filename + "\r\n" +
|
|
"Line: " + event.lineno + "\r\n" +
|
|
"Column: " + event.colno + "\r\n" +
|
|
"Stack: " + event.error.stack;
|
|
|
|
configureErrorPopup(textToShow);
|
|
});
|
|
|
|
function showChangePasswordPopup() {
|
|
$("#password-changing-popup").modal("show");
|
|
calcChPwPrepend();
|
|
}
|
|
|
|
function copyErrorToClipboard() {
|
|
var element = document.querySelector("#fehlerdetail-textarea");
|
|
element.select();
|
|
element.setSelectionRange(0, 99999);
|
|
|
|
document.execCommand("copy");
|
|
}
|
|
|
|
function showErrorPopup(error) {
|
|
hideSpinner();
|
|
|
|
var textToShow = "name: " + error.name + ";\r\nmessage: " + error.message + ";\r\nstack: " + error.stack;
|
|
|
|
configureErrorPopup(textToShow);
|
|
}
|
|
|
|
function configureErrorPopup(textToShow) {
|
|
$("#fehlerdetail-textarea").text(textToShow);
|
|
$("#error-message-popup").modal("show");
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|
|
try {
|
|
$("textarea").each(function () {
|
|
var id = this.getAttribute("id");
|
|
|
|
// Die textarea des Fehlerpopups soll scrollbar sein!
|
|
if (id === "fehlerdetail-textarea") {
|
|
return;
|
|
}
|
|
|
|
this.setAttribute("style", "height:" + (this.scrollHeight) + "px;overflow-y:hidden;");
|
|
}).on("input", function () {
|
|
this.style.height = 0;
|
|
this.style.height = (this.scrollHeight) + "px";
|
|
});
|
|
|
|
var timeoutInMilliseconds = parseInt("@AbstractBaseController.TimeoutLimit", 10) * 60 * 1000;
|
|
|
|
var timeOfLogin = "@AbstractModel.TimeOfLastAction";
|
|
|
|
if(timeOfLogin.length > 0) {
|
|
var countDownDate = new Date().getTime() + timeoutInMilliseconds;
|
|
|
|
var interval = setInterval(function() {
|
|
var now = new Date().getTime();
|
|
|
|
var distance = countDownDate - now;
|
|
|
|
if (distance <= 0) {
|
|
clearInterval(interval);
|
|
$("#countdown").html("00:00");
|
|
|
|
$("#logout-form").submit();
|
|
|
|
return;
|
|
}
|
|
|
|
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
|
|
|
var m = minutes.toString();
|
|
var s = seconds.toString();
|
|
|
|
if (minutes < 10) {
|
|
m = "0" + m;
|
|
}
|
|
|
|
if (seconds < 10) {
|
|
s = "0" + s;
|
|
}
|
|
|
|
$("#countdown").html("Abmeldung in " + m + ":" + s + '<span class="fas fa-unlock-alt pl-1"></span>');
|
|
}, 1000);
|
|
}
|
|
|
|
calcPrependWidth();
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
});
|
|
|
|
$(window).resize(function() {
|
|
logSize();
|
|
calcPrependWidth();
|
|
});
|
|
|
|
previousWidth = "";
|
|
function logSize() {
|
|
var width = $(document).width();
|
|
|
|
var val = widthToBootstrapVal(width);
|
|
|
|
if(previousWidth !== val) {
|
|
console.log("%c" + val, "font-size: 16px; font-weight: bold; color: #00F2FF;");
|
|
}
|
|
|
|
previousWidth = val;
|
|
}
|
|
|
|
function widthToBootstrapVal(width) {
|
|
try {
|
|
/*
|
|
Extra small <576px
|
|
Small ≥576px
|
|
Medium ≥768px
|
|
Large ≥992px
|
|
Extra large ≥1200px
|
|
*/
|
|
var result = "xs";
|
|
|
|
if(width < 567) {
|
|
result = "xs";
|
|
}
|
|
|
|
if(width >= 576) {
|
|
result = "sm";
|
|
}
|
|
|
|
if(width >= 768) {
|
|
result = "md";
|
|
}
|
|
|
|
if(width >= 992) {
|
|
result = "lg";
|
|
}
|
|
|
|
if(width >= 1200) {
|
|
result = "xl";
|
|
}
|
|
|
|
return result;
|
|
} catch(error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function countdownClick() {
|
|
$("#countdown-tooltip").tooltip('show');
|
|
|
|
setTimeout(function() {
|
|
$("#countdown-tooltip").tooltip('hide');
|
|
}, 1500);
|
|
}
|
|
|
|
var initialVonWidth = 0;
|
|
function calcPrependWidth() {
|
|
try {
|
|
// Prepend-Elemente
|
|
if(initialVonWidth === 0 && $.isNumeric(getMaxWidth("sm-prepend-input-group-text"))) {
|
|
initialVonWidth = getMaxWidth("sm-prepend-input-group-text");
|
|
}
|
|
|
|
var smallPrependInputGroupTextWidth = getMaxWidth("sm-prepend-input-group-text");
|
|
var documentWidth = $(document).width();
|
|
|
|
$(".prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
|
|
|
|
if(documentWidth < 768 && $.isNumeric(smallPrependInputGroupTextWidth)) {
|
|
$(".sm-prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
|
|
} else if($.isNumeric(smallPrependInputGroupTextWidth)) {
|
|
$(".sm-prepend-input-group-text").width(initialVonWidth);
|
|
}
|
|
} catch(error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function getMaxWidth(elementClassName) {
|
|
try {
|
|
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).width(); }).get());
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function getMaxElementHeight(elementClassName) {
|
|
try {
|
|
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).height(); }).get());
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
@if(MobileSessionFacade.IsUserLoggedIn())
|
|
{
|
|
using(Html.BeginForm("LogOutAfterSessionTimeout", "Main", FormMethod.Post, new { id = "logout-form", css = "display:none;" }))
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
@if(Model != null)
|
|
{
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top justify-content-end">
|
|
<div class="container-fluid">
|
|
<a href="#" class="navbar-brand">
|
|
@Model.LoggedInEmplyeeFirstNameLastName
|
|
</a>
|
|
|
|
<span class="d-inline-block" data-toggle="tooltip" title="Zeit bis zur automatischen Abmeldung" id="countdown-tooltip">
|
|
<span class="navbar-text" id="countdown" onclick="countdownClick()"></span>
|
|
</span>
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
|
<ul class="navbar-nav ml-auto">
|
|
@*@if(Html.IsInDebugMode())
|
|
{
|
|
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-hand-middle-finger"></i>
|
|
Scheduler
|
|
</button>
|
|
</li>
|
|
}
|
|
}*@
|
|
|
|
@if(AbstractModel.IsAllowedToSeeCustomers)
|
|
{
|
|
using(Html.BeginForm("RedirectToCustomer", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-user text-bewo-customers"></i>
|
|
Klienten
|
|
</button>
|
|
</li>
|
|
}
|
|
}
|
|
|
|
@using(Html.BeginForm("RedirectToMain", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-clock text-bewo-service-records"></i>
|
|
Zeiterfassung
|
|
</button>
|
|
</li>
|
|
}
|
|
|
|
@if(AbstractModel.IsAllowedToSeeScheduler)
|
|
{
|
|
using(Html.BeginForm("RedirectToScheduler", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-calendar-alt text-bewo-calendar"></i>
|
|
Kalender
|
|
</button>
|
|
</li>
|
|
}
|
|
}
|
|
|
|
@if(AbstractModel.HasRightToViewQuittierungsbelege)
|
|
{
|
|
using(Html.BeginForm("RedirectToReportView", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-chart-bar text-bewo-report">
|
|
|
|
</i>
|
|
Quittierungsbelege
|
|
</button>
|
|
</li>
|
|
}
|
|
}
|
|
|
|
@if(AbstractModel.HasRightToViewReports && AbstractModel.HasRightToViewMitarbeiterstundenkonto)
|
|
{
|
|
using(Html.BeginForm("RedirectToReportViewer", "Main", FormMethod.Post))
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-chart-bar text-bewo-report"></i>
|
|
Auswertungen
|
|
</button>
|
|
</li>
|
|
}
|
|
}
|
|
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showAboutPopup()">
|
|
<i class="fas fa-balance-scale text-primary"></i>
|
|
Über
|
|
</button>
|
|
</li>
|
|
|
|
@if(Html.IsInDebugMode())
|
|
{
|
|
<li class="nav-item">
|
|
<button class="btn btn-link text-light no-underline" onclick="showChangePasswordPopup()">
|
|
<i class="fas fa-lock text-danger"></i>
|
|
Passwort ändern
|
|
</button>
|
|
</li>
|
|
}
|
|
|
|
<li class="nav-item">
|
|
@using(Html.BeginForm("Logout", "Main", FormMethod.Post))
|
|
{
|
|
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
|
<i class="fas fa-sign-out-alt text-primary"></i>
|
|
Abmelden
|
|
</button>
|
|
}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
}
|
|
|
|
<div class="modal" role="dialog" tabindex="-1" id="mySpinner">
|
|
<div class="modal-dialog modal-dialog-centered text-center" role="document">
|
|
<div class="modal-content bg-transparent border-0">
|
|
<div class="d-flex justify-content-center">
|
|
<div class="spinner-border text-primary" role="status" style="width: 5rem; height: 5rem;">
|
|
<span class="sr-only"></span>
|
|
</div>
|
|
</div>
|
|
<p id="loading-info-p" class="text-white mt-4">Lade ...</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="messagePopup">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="popupTitle"></h5>
|
|
<button class="close" type="button" data-dismiss="modal" aria-label="close" id="message-popup-esc-btn">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body" id="modal-body">
|
|
<p id="popupMessage"></p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-primary" type="button" data-dismiss="modal" id="message-popup-ok-btn">OK</button>
|
|
<button class="btn btn-secondary" type="button" data-dismiss="modal" id="message-popup-close-btn">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="error-message-popup">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title text-danger">Es ist ein Fehler aufgetreten</h5>
|
|
<button class="close" type="button" data-dismiss="modal" aria-label="close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>
|
|
Es ist leider ein unbekannter Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung oder versuchen Sie es später erneut. Wir sind stets bemüht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an <a href="mailto:support@bewoplaner.de" id="error-popup-mailto">support@bewoplaner.de</a> senden.
|
|
</p>
|
|
<hr/>
|
|
<div class="form-group">
|
|
<label for="fehlerdetail-textarea">Fehlerdetails:</label>
|
|
<textarea class="form-control font-italic text-monospace" style="height: 20em !important; max-height: 20em !important; scroll-behavior: auto !important;" id="fehlerdetail-textarea"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<div class="clearfix w-100">
|
|
<button class="btn btn-primary float-left" type="button" onclick="copyErrorToClipboard()">In die Zwischenablage kopieren</button>
|
|
<button class="btn btn-primary float-right" type="button" data-dismiss="modal">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@if(!(TempData["ErrorMessage"] is null))
|
|
{
|
|
<div class="container-fluid mt-3">
|
|
<div class="row d-flex justify-content-center">
|
|
<div class="col-md-3 col-lg-4">
|
|
<div class="alert alert-danger" role="alert">
|
|
@TempData["ErrorMessage"]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
|
|
@RenderBody()
|
|
</body>
|
|
</html>
|