updated email verification popup with animations and functionality

This commit is contained in:
mrjvs
2019-01-08 17:26:16 +01:00
parent 5ed544822b
commit c66709b1b1
3 changed files with 16 additions and 1 deletions

View File

@@ -78,6 +78,14 @@ nav.userNav .links .navItem.active {
background-color: white;
border: 1px solid #d1d1d1;
padding: 1em 2em;
transition: transform .2s ease-in, max-height .2s, padding .5s;
overflow: hidden;
max-height: 100vh;
}
.email_popup.closed {
transform: translateY(-15rem);
max-height: 0;
padding: 0;
}
.email_popup p {
padding: 0;

View File

@@ -98,4 +98,9 @@ function sendMessage() {
showErrorPopup(response.errors);
}
}
}
function email_resend() {
var xhr = postAjax('/api/v1/resendemail', {});
document.getElementById('email_verification_popup').classList.add('closed');
}

View File

@@ -4,10 +4,12 @@
{{> head-common }}
<!-- page specific -->
<link rel="stylesheet" href="/assets/css/pretendo-pnid.css">
<!-- scripts -->
<script src="/assets/js/api.js"></script>
</head>
<body class="flex">
{{> nav-default }}
<div id="email_validation_popup" class="email_popup{{#if_eq user.email_validated true}} hide{{/if_eq}}"><p>{{ locale.verify_email_popup.text }}</p><span><button class="btn-alt small">{{ locale.validate_email_popup.change_button_text }}</button> <button class="btn small">{{ locale.verify_email_popup.repeat_button_text }}</button></span></div>
<div id="email_verification_popup" class="email_popup{{#if_eq user.email_validated true}} hide{{/if_eq}}"><p>{{ locale.verify_email_popup.text }}</p><span><button class="btn-alt small">{{ locale.validate_email_popup.change_button_text }}</button> <button class="btn small" onclick="email_resend();">{{ locale.verify_email_popup.repeat_button_text }}</button></span></div>
<div class="contentWrapper userPage">
{{> nav-dashboard }}
<section class="contentCard">