647 lines
No EOL
20 KiB
Text
647 lines
No EOL
20 KiB
Text
@using Kreta.BusinessLogic.Classes
|
|
@using Kreta.Web.Areas.Adminisztracio.Models;
|
|
@using Kreta.BusinessLogic.Classes;
|
|
|
|
@model LoginModel
|
|
|
|
@{
|
|
ViewBag.Title = LoginResource.Login;
|
|
Layout = null;
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
|
<title>@(LoginResource.KretaIskolaiAlaprendszer)</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Roboto+Condensed:wght@300;400;700&display=swap" rel="stylesheet">
|
|
<link rel="icon" href="../../favicon.ico" type="image/x-icon" />
|
|
<script src='https://www.google.com/recaptcha/api.js?hl=hu'></script>
|
|
@Styles.Render("~/Content/css", "~/Content/kretaControls")
|
|
@Styles.Render(Request.Browser.IsMobileDevice ? "~/Content/kretaMobileCss" : "~/Content/kretaCss")
|
|
@Scripts.Render("~/bundles/document-register-element")
|
|
@Scripts.Render("~/bundles/modernizr")
|
|
@Scripts.Render("~/bundles/jquery")
|
|
@Scripts.Render("~/bundles/js")
|
|
@Scripts.Render("~/bundles/kendo")
|
|
@Scripts.Render("~/bundles/KretaWindowHelper")
|
|
|
|
@Html.Raw(Kreta.Core.Analytics.Client.Factory.GetInstance())
|
|
|
|
<style>
|
|
html {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
font-family: "Open Sans";
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: #445261;
|
|
background-color: #385765;
|
|
}
|
|
|
|
#login {
|
|
position: relative;
|
|
z-index: 200;
|
|
}
|
|
|
|
#login input[type="text"]:hover,
|
|
#login input.k-textbox:hover,
|
|
#login input[type="password"]:hover {
|
|
width: 100%;
|
|
height: 36px;
|
|
background-color: #e5e9ec;
|
|
border: 1px solid #30a8cb;
|
|
padding: 0 5px;
|
|
outline: 0;
|
|
}
|
|
|
|
#login input[type="text"]:focus,
|
|
#login input[type="password"]:focus,
|
|
#login input[type="text"]:active,
|
|
#login input.k-textbox:active,
|
|
#login input[type="password"]:active {
|
|
width: 100%;
|
|
height: 36px;
|
|
background-color: white;
|
|
border: 1px solid #30a8cb;
|
|
padding: 0 5px;
|
|
outline: 0;
|
|
}
|
|
|
|
#login input[type="text"],
|
|
#login input.k-textbox,
|
|
#login input[type="password"],
|
|
#login select {
|
|
width: 100%;
|
|
height: 36px;
|
|
background-color: #e5e9ec;
|
|
border: none;
|
|
margin: 10px 0;
|
|
padding: 0 6px;
|
|
outline: 0;
|
|
-moz-box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
font-family: "Open Sans";
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
#login .login_ErrorText {
|
|
color: red;
|
|
}
|
|
|
|
#login h2 {
|
|
color: white;
|
|
font-weight: 300;
|
|
font-size: 2em;
|
|
margin: 0;
|
|
}
|
|
|
|
#login .login_main {
|
|
text-align: center;
|
|
height: auto;
|
|
padding-top: 8%;
|
|
}
|
|
|
|
#login .login_logo {
|
|
margin: 0 auto;
|
|
width: 400px;
|
|
display: block;
|
|
background-position: center center;
|
|
height: 100px;
|
|
padding-top: 25px;
|
|
}
|
|
|
|
#login .login_main .login_container {
|
|
width: 400px;
|
|
margin: 0 auto;
|
|
display: block;
|
|
background-color: white;
|
|
}
|
|
|
|
#login .login_header {
|
|
background-color: #30a8cb;
|
|
padding: 10px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
#login .login_content {
|
|
padding: 20px;
|
|
-moz-box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#login .login_main .login_systemmessage_container {
|
|
width: 600px;
|
|
margin: 0 auto;
|
|
display: block;
|
|
background-color: white;
|
|
border-width: 3px;
|
|
border-color: #30a8cb;
|
|
border-style: solid;
|
|
}
|
|
|
|
#login .login_systemmessage_header {
|
|
background-color: #30a8cb;
|
|
padding: 5px 0;
|
|
text-align: center;
|
|
font-size: 14px;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
#login .login_systemmessage_content {
|
|
padding: 10px;
|
|
-moz-box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
overflow-y: auto;
|
|
font-size: 13px;
|
|
}
|
|
|
|
#login .Login_ErrorContainer {
|
|
height: 100%;
|
|
}
|
|
|
|
#login .login_button {
|
|
position: relative;
|
|
float: right;
|
|
height: 36px;
|
|
width: auto;
|
|
padding: 5px 10px;
|
|
background-color: #30a8cb;
|
|
color: white;
|
|
text-transform: uppercase;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#login .login_button:hover {
|
|
position: relative;
|
|
float: right;
|
|
width: auto;
|
|
padding: 5px 10px;
|
|
background-color: #5BB2CB;
|
|
color: white;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
#login .login_link {
|
|
float: left;
|
|
-moz-text-decoration: none;
|
|
text-decoration: none;
|
|
color: #445261;
|
|
padding: 5px 0;
|
|
}
|
|
|
|
#login .login_link:hover {
|
|
color: #30a8cb;
|
|
-moz-text-decoration: underline;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
#login .login_foot {
|
|
padding: 20px 0;
|
|
margin-top: 200px;
|
|
margin: 0 auto;
|
|
width: 400px;
|
|
display: block;
|
|
font-size: 12px;
|
|
color: #bac8d5;
|
|
}
|
|
|
|
#login .login_lng input {
|
|
padding: 0 5px;
|
|
}
|
|
|
|
#login .passwordButton {
|
|
margin-top: -10px;
|
|
}
|
|
|
|
#login .login_animationcontrol {
|
|
cursor: pointer;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.Forgot_Password {
|
|
padding-top: 8px;
|
|
padding-left: 10px;
|
|
padding-bottom: 0px;
|
|
color: #bac8d5;
|
|
float: right;
|
|
}
|
|
|
|
.Forgot_Password_SZIR {
|
|
padding-top: 8px;
|
|
padding-left: 10px;
|
|
padding-bottom: 0px;
|
|
color: #bac8d5;
|
|
float: left;
|
|
}
|
|
|
|
.Forgot_Password a, .Forgot_Password_SZIR a {
|
|
cursor: pointer;
|
|
color: #5c6a79 !important;
|
|
-moz-text-decoration: none;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.GondviseloJelszoIgeny {
|
|
padding-top: 20px;
|
|
color: #bac8d5;
|
|
float: left;
|
|
}
|
|
|
|
.BejelentkezesDiv {
|
|
float: right;
|
|
padding-top: 10px;
|
|
}
|
|
|
|
.GondviseloJelszoIgeny a {
|
|
color: #5c6a79 !important;
|
|
cursor: pointer;
|
|
-moz-text-decoration: none;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.ElfelejtettJelszo {
|
|
padding-top: 8px;
|
|
color: #bac8d5;
|
|
cursor: pointer;
|
|
float: left;
|
|
}
|
|
|
|
.ElfelejtettJelszo a {
|
|
color: #5c6a79 !important;
|
|
-moz-text-decoration: none;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.organization_name {
|
|
padding: 5px 15px;
|
|
font-weight: bold;
|
|
color: white;
|
|
line-height: inherit;
|
|
font-size: 16px;
|
|
overflow-wrap: break-word;
|
|
word-wrap: break-word;
|
|
-ms-word-break: break-all;
|
|
word-break: break-all;
|
|
word-break: break-word;
|
|
-ms-hyphens: auto;
|
|
-moz-hyphens: auto;
|
|
-webkit-hyphens: auto;
|
|
hyphens: auto;
|
|
}
|
|
|
|
.organization_code {
|
|
color: white;
|
|
}
|
|
|
|
.login_foot .adatvedelmi a:link, a:visited, a:active, a:hover {
|
|
color: white;
|
|
font-size: 14px;
|
|
}
|
|
|
|
#idpLogoutIframe {
|
|
width: 0px;
|
|
height: 0px;
|
|
display: none;
|
|
}
|
|
|
|
.g-recaptcha {
|
|
margin-top: 5px;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
#loginSpinnerDiv {
|
|
width: 100%;
|
|
height: 5px;
|
|
display: flex;
|
|
}
|
|
|
|
@@media screen and (max-width: 600px) {
|
|
body > div:last-child {
|
|
left: 0px !important;
|
|
top: 0px !important;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
@{ Html.RenderPartial("Globalization"); }
|
|
|
|
<div id="login">
|
|
<div class="login_main">
|
|
<div class="login_logo">
|
|
<img src="~/App_Themes/Skin_Kreta_Gfx/content/images/kreta_feher_login.png" alt="login" />
|
|
</div>
|
|
|
|
@using (Html.KretaForm("LoginForm"))
|
|
{
|
|
<div class="login_container">
|
|
<div class="login_header">
|
|
<h4 class="organization_name">
|
|
<span>@(Model.IntezmenyNeve)</span>
|
|
</h4>
|
|
<div class="organization_code">
|
|
OM kód: <span>@(Model.IntezmenyOMkod)</span>
|
|
</div>
|
|
</div>
|
|
<div class="login_content">
|
|
<div class="login_lng" hidden>
|
|
<a href="@Url.Action("ChangeLanguage", new { Id = 1038 })" onmouseout="LanguageHelper.mouseout($(this), 50);" onmouseover="LanguageHelper.mouseover($(this));">
|
|
<img src="~/App_Themes/Common_Images/flag_hu.png" alt="Hun" />
|
|
</a>
|
|
</div>
|
|
<div>
|
|
@Html.KretaTextBoxFor(m => m.UserName, new Dictionary<string, object> { { "placeholder", LoginResource.Username }, { "autocomplete", "username" } })
|
|
</div>
|
|
<div>
|
|
@Html.KretaPasswordFor(m => m.Password, new Dictionary<string, object> { { "placeholder", LoginResource.Password }, { "autocomplete", "current-password" } })
|
|
</div>
|
|
<div class="Login_ErrorContainer">
|
|
<span class="login_ErrorText" id="lblError"></span>
|
|
</div>
|
|
|
|
<div class="g-recaptcha" data-size="invisible" data-callback="login" data-theme="light" data-sitekey="@ApplicationData.ReCaptchaPublicKey"></div>
|
|
|
|
@if (Model.LejartLicence)
|
|
{
|
|
<div class="Login_ErrorContainer" style="margin-top: -20px; padding-bottom: 20px;">
|
|
<span class="login_ErrorText" id="lblLicenceError">@LoginResource.LejartLicence</span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
if (!Model.IsSzirIntezmeny)
|
|
{
|
|
<div class="Forgot_Password">
|
|
<a href="https://tudasbazis.ekreta.hu/pages/viewpage.action?pageId=2425086" target="_blank">Nem tud bejelentkezni?</a>
|
|
</div>
|
|
if (!Model.IsArchivIntezmeny)
|
|
{
|
|
<div class="ElfelejtettJelszo">
|
|
@Html.ActionLink(LoginResource.ElfelejtettJelszo, "Index", "ElfelejtettJelszo")
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="ElfelejtettJelszo" style="min-width: 200px;"> </div>
|
|
}
|
|
<div style="height:40px; margin-top:22px">
|
|
<div class="GondviseloJelszoIgeny">
|
|
@if (Model.CsokkentettGondviseloEnable && !Model.IsArchivIntezmeny)
|
|
{
|
|
@Html.ActionLink(LoginResource.GondviseloiJelszoIgenylese, "Index", "GondviseloJelszoIgenylo")
|
|
}
|
|
</div>
|
|
|
|
<div class="BejelentkezesDiv">
|
|
|
|
<input role="button" type="button" id="btnSubmit" value="@LoginResource.Login" onclick="LoginHelper.validate();" class="login_button" />
|
|
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="BejelentkezesDiv">
|
|
|
|
<input role="button" type="button" id="btnSubmit" value="@LoginResource.Login" onclick="LoginHelper.validate();" class="login_button" />
|
|
|
|
</div>
|
|
|
|
<div class="Forgot_Password_SZIR">
|
|
<a href="https://tudasbazis.ekreta.hu/pages/viewpage.action?pageId=2425086" target="_blank">Nem tud bejelentkezni?</a>
|
|
</div>
|
|
}
|
|
<div id="loginSpinnerDiv">
|
|
<span id="loginSpinner" class="k-icon k-loading" style="margin: auto;"></span>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="login_foot">
|
|
<div class="adatvedelmi">
|
|
<u><a href="https://tudasbazis.ekreta.hu/pages/viewpage.action?pageId=4064926" target="_blank">@LoginResource.AdatvedelmiTajekoztato</a></u>
|
|
</div>
|
|
<div class="login_infoVersion">
|
|
<span id="lblVersion" class="szovegVersion">@Html.Raw(ViewBag.Version)</span>
|
|
</div>
|
|
<div class="login_Infotext">
|
|
@LoginResource.TamogatottBongeszok
|
|
<br /> @LoginResource.BongeszoList
|
|
</div>
|
|
</div>
|
|
|
|
<div class="login_systemmessage_container">
|
|
<div class="login_systemmessage_header">
|
|
@Model.NextUpdateHeader
|
|
</div>
|
|
<div class="login_systemmessage_content">
|
|
@Html.Raw(string.Format(Model.NextUpdateMessage, ViewBag.NextUpdateDateTimeText))
|
|
</div>
|
|
</div>
|
|
<div class="login_foot">
|
|
<iframe id="idpLogoutIframe" src=""></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
hideLoginLoader();
|
|
});
|
|
|
|
function hideLoginLoader() {
|
|
$("#loginSpinnerDiv").hide();
|
|
$("#loginSpinner").hide();
|
|
}
|
|
|
|
function login(token) {
|
|
/*a capcha valamiért nem látja mint függvény ha direktben adom meg*/
|
|
LoginHelper.login(token);
|
|
}
|
|
|
|
var LoginHelper = (function () {
|
|
var loginHelper = function () { };
|
|
|
|
var reCaptchaIsEnabled = @Json.Encode(Model.ReCaptchaIsEnabled);
|
|
|
|
var idpLogoutUrl = "@Html.Raw(Model.IdpLogoutUrl)";
|
|
var loginInProgress = false;
|
|
var loginRedirectWaitTimer = null;
|
|
|
|
loginHelper.validate = function () {
|
|
|
|
reCaptchaIsEnabled ? grecaptcha.execute() : login();
|
|
|
|
};
|
|
|
|
loginHelper.login = function (token) { login(token); };
|
|
loginHelper.loginRedirect = function () { loginRedirect(); };
|
|
loginHelper.cancelLogin = function () { cancelLogin(); };
|
|
loginHelper.requestNewPassword = function () { requestNewPassword(); };
|
|
|
|
function login(token) {
|
|
if (loginInProgress) {
|
|
return;
|
|
}
|
|
|
|
loginInProgress = true;
|
|
$("#btnSubmit").attr("disabled", "");
|
|
|
|
$("#loginSpinnerDiv").show();
|
|
$("#loginSpinner").show();
|
|
|
|
var data = $("#LoginForm").toObject();
|
|
|
|
data.ReCaptchaIsEnabled = reCaptchaIsEnabled;
|
|
if (reCaptchaIsEnabled) {
|
|
data.ReCaptcha = token;
|
|
|
|
if (data.ReCaptcha === '') {
|
|
$("#lblError").text("@Html.Raw(ErrorResource.ABelepeshezACaptchaKozetelezo)");
|
|
$("#btnSubmit").removeAttr("disabled");
|
|
loginInProgress = false;
|
|
return;
|
|
}
|
|
}
|
|
|
|
AjaxHelper.DoValidationPost("@Url.Action("LoginCheck", "Login")",
|
|
"LoginForm",
|
|
data,
|
|
loginCallback
|
|
);
|
|
}
|
|
|
|
function loginCallback(answer) {
|
|
if (answer.Success) {
|
|
if (typeof answer.WarningMessage !== "undefined" && answer.WarningMessage !== "") {
|
|
alert(answer.WarningMessage);
|
|
}
|
|
$("#UserName").val("");
|
|
$("#Password").val("");
|
|
|
|
if (idpLogoutUrl != "") {
|
|
startLoginRedirectTimer();
|
|
$("#idpLogoutIframe").attr("src", idpLogoutUrl);
|
|
} else {
|
|
loginRedirect();
|
|
}
|
|
}
|
|
else if (typeof answer.Link !== "undefined" && answer.Link !== "") {
|
|
location.href = answer.Link;
|
|
hideLoginLoader();
|
|
}
|
|
else if (answer.ErrorCode === "AccountError") {
|
|
loginInProgress = false;
|
|
$("#btnSubmit").removeAttr("disabled");
|
|
$('.Forgot_Password').attr("hidden", false);
|
|
$("#lblError").text(answer.ErrorMessage);
|
|
// set reCAPTCHA value
|
|
reCaptchaIsEnabled = answer.ReCaptchaIsEnabled;
|
|
|
|
if (reCaptchaIsEnabled) {
|
|
grecaptcha.reset();
|
|
}
|
|
cancelLogin();
|
|
hideLoginLoader();
|
|
}
|
|
}
|
|
|
|
function cancelLogin() {
|
|
stopLoginRedirectTimer();
|
|
AjaxHelper.DoPost("@Url.Action("LogOut", "Login")");
|
|
$("#Password").val("");
|
|
$("#UserName").val("");
|
|
KretaWindowHelper.destroyAllWindow();
|
|
$("#UserName").focus();
|
|
}
|
|
|
|
function loginRedirect() {
|
|
location.href = "@Url.Action("Index", "BelepesKezelo", new { Area = "Adminisztracio" })";
|
|
}
|
|
|
|
function startLoginRedirectTimer() {
|
|
loginRedirectWaitTimer = setInterval("LoginHelper.loginRedirect()", 3000);
|
|
}
|
|
|
|
function stopLoginRedirectTimer() {
|
|
if (loginRedirectWaitTimer != null) {
|
|
clearInterval(loginRedirectWaitTimer);
|
|
}
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
$("#UserName").focus();
|
|
|
|
$("#idpLogoutIframe").bind("load", function (e) {
|
|
if (e.target.attributes.src.value != "") {
|
|
stopLoginRedirectTimer();
|
|
loginRedirect();
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).keypress(function (event) {
|
|
if (event.keyCode === 13) {
|
|
$("#btnSubmit").click();
|
|
}
|
|
});
|
|
|
|
return loginHelper;
|
|
})();
|
|
</script>
|
|
<script>
|
|
var LanguageHelper = (function () {
|
|
var languageHelper = function () { };
|
|
|
|
languageHelper.mouseout = function (button, percent) { mouseout(button, percent); };
|
|
languageHelper.mouseover = function (button) { mouseover(button); };
|
|
|
|
function mouseout(button, percent) {
|
|
button.css({
|
|
"opacity": "0." + percent,
|
|
"filter": "alpha(opacity=" + percent + ")",
|
|
"-moz-opacity": "0." + percent
|
|
});
|
|
}
|
|
|
|
function mouseover(button) {
|
|
button.css({
|
|
"opacity": "1",
|
|
"filter": "alpha(opacity=100)",
|
|
"-moz-opacity": "1"
|
|
});
|
|
}
|
|
|
|
return languageHelper;
|
|
})();
|
|
</script>
|
|
|
|
<!--
|
|
branchName: @Kreta.Core.KretaVersion.Instance.BranchName
|
|
commitNumber: @Kreta.Core.KretaVersion.Instance.CommitNumber
|
|
-->
|
|
|
|
</body>
|
|
</html> |