Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
connectbo committed Feb 1, 2022
1 parent ef04dc6 commit 9e259db
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
27 changes: 26 additions & 1 deletion src/metalnx-web/src/main/resources/static/css/styles-login.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ img {
left: 50%;
display: block;
margin-top: -185px;
margin-left: -235px;
margin-left: -260px;
padding: 25px;
width: 520px;
height: 500px;
Expand Down Expand Up @@ -291,3 +291,28 @@ input, textarea, .uneditable-input {
input[type="button"], input[type="radio"], input[type="checkbox"] {
width: auto;
}


.login-popup {
position: absolute;
top: 5%;
left: 50%;
padding: 10px;
background-color: #e6a153;
width: 500px;
margin-left: -250px;
border-radius: 10px;
}

.login-popup-btn {
position: absolute;
right: 1px;
width: 20px;
height: 20px;
opacity: 0.3;
cursor: pointer;
}

.login-popup-btn:hover {
opacity: 1;
}
17 changes: 16 additions & 1 deletion src/metalnx-web/src/main/resources/views/login/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
<span th:text="#{login.copyright}"></span>
</div> -->
</div>
<div class="login-popup">
<span class="login-popup-msg">Metalnx is a restricted system. Usage may be monitored, recorded, and subject to audit. Unauthorized use of Metalnx is prohibited and subject to criminal and civil penalties. Use of this system indicates you consent to these conditions and agree to abide by applicable usage policies.</span>
<a class="login-popup-btn"><i class="fa fa-times"></i></a>
</div>
</body>

<script>
Expand All @@ -144,7 +148,13 @@
}

for (var i = 0; i < mlxKeys.length; i++) {
localStorage.removeItem(mlxKeys[i]);
if(mlxKeys[i] !== 'metalnx-popup-read') localStorage.removeItem(mlxKeys[i]);
}

var renderRestrictedMsgPopup = localStorage.getItem('metalnx-popup-read')

if(renderRestrictedMsgPopup === 'true') {
$(".login-popup").hide();
}

$(".login form input").keyup(function() {
Expand Down Expand Up @@ -178,6 +188,11 @@
$(this).submit();
});

$(".login-popup-btn").click(function () {
$(".login-popup").hide();
localStorage.setItem('metalnx-popup-read', 'true')
});

function isValidPath(path) {
return path != '' && path.indexOf("/") >= 0 && path.indexOf("/") != path.length - 1;
}
Expand Down

0 comments on commit 9e259db

Please sign in to comment.