Project

General

Profile

« Previous | Next » 

Revision 52118

Added by Sofia Baltzi over 6 years ago

Add RequestToDelete page

View differences:

modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/VerifyToDeleteServlet.java
1
package eu.dnetlib.openaire.usermanagement;
2

  
3
import eu.dnetlib.openaire.user.utils.InputValidator;
4
import eu.dnetlib.openaire.user.utils.LDAPActions;
5
import eu.dnetlib.openaire.user.utils.VerificationActions;
6
import eu.dnetlib.openaire.usermanagement.utils.UrlConstructor;
7
import org.apache.log4j.Logger;
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
10

  
11
import javax.servlet.ServletConfig;
12
import javax.servlet.ServletException;
13
import javax.servlet.http.HttpServlet;
14
import javax.servlet.http.HttpServletRequest;
15
import javax.servlet.http.HttpServletResponse;
16
import javax.servlet.http.HttpSession;
17
import java.io.IOException;
18
import java.io.PrintWriter;
19

  
20
/**
21
 * Created by sofia on 21/5/2018.
22
 */
23
public class VerifyToDeleteServlet extends HttpServlet {
24

  
25
    public void init(ServletConfig config) throws ServletException {
26
        super.init(config);
27
        SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
28
                config.getServletContext());
29
    }
30

  
31
    @Autowired
32
    private VerificationActions verificationActions;
33

  
34
    @Autowired
35
    private LDAPActions ldapActions;
36

  
37
    private Logger logger = Logger.getLogger(VerificationCodeServlet.class);
38

  
39
    @Override
40
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
41
        response.setContentType("text/html");
42
        PrintWriter printWriter = response.getWriter();
43

  
44
        String formUsername = request.getParameter("username").trim();
45
        String formVerificationCode = request.getParameter("verification_code").trim();
46

  
47
        try {
48
            if (InputValidator.isFilled(formUsername) && InputValidator.isFilled(formVerificationCode)) {
49
                if (verificationActions.verificationEntryExists(formUsername) && verificationActions.verificationCodeIsCorrect(formUsername, formVerificationCode)) {
50
                    if (!verificationActions.verificationCodeHasExpired(formUsername)) {
51

  
52
                        Boolean isRegistered = false;
53
                        Boolean isZombie = false;
54

  
55
                        if (ldapActions.usernameExists(formUsername)) {
56
                            logger.info("User " + formUsername + " is activated user!");
57
                            isRegistered = true;
58
                        } else if (ldapActions.isZombieUsersUsername(formUsername)) {
59
                            logger.info("User " + formUsername + " is zombie user!");
60
                            isZombie = true;
61
                        }
62

  
63
                        if (!isRegistered && !isZombie) {
64
                            request.getSession().setAttribute("message", "Username or verification code are not valid.");
65
                            response.sendRedirect("./verifyToDelete.jsp");
66
                        } else {
67
                            if (isRegistered) {
68
                                ldapActions.deleteUser(formUsername);
69
                            } else if (isZombie) {
70
                                ldapActions.deleteZombieUser(formUsername);
71
                            }
72
                            response.sendRedirect(UrlConstructor.getRedirectUrl(request,"successDeleteAccount.jsp"));
73

  
74
                        }
75
                    } else {
76
                        logger.info("Verification code has expired!");
77
                        response.sendRedirect(UrlConstructor.getRedirectUrl(request, "expiredVerificationCode.jsp"));
78
                    }
79
                } else {
80
                    logger.info("Username or verification code are not valid!");
81
                    request.getSession().setAttribute("message", "Username or verification code are not valid.");
82
                    response.sendRedirect("./verifyToDelete.jsp");
83
                }
84
            } else {
85
                if (!InputValidator.isFilled(formUsername)) {
86
                    logger.info("No username");
87
                    request.getSession().setAttribute("msg_username_error", "Please enter your username.");
88
                }
89
                if (!InputValidator.isFilled(formVerificationCode)) {
90
                    logger.info("No verification code");
91
                    request.getSession().setAttribute("msg_verification_code_error", "Please enter your verification code.");
92
                }
93
                response.sendRedirect("./verifyToDelete.jsp");
94
            }
95
        } catch (Exception ldape) {
96
            logger.error("Could not remove user with username " + formUsername, ldape);
97
            response.sendRedirect(UrlConstructor.getRedirectUrl(request, "error.jsp"));
98
        }
99

  
100
        printWriter.close();
101
    }
102
}
modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/RequestToDeleteAccountServlet.java
1
package eu.dnetlib.openaire.usermanagement;
2

  
3
import eu.dnetlib.openaire.user.utils.EmailSender;
4
import eu.dnetlib.openaire.user.utils.LDAPActions;
5
import eu.dnetlib.openaire.user.utils.VerificationActions;
6
import eu.dnetlib.openaire.user.utils.VerifyRecaptcha;
7
import eu.dnetlib.openaire.usermanagement.utils.UrlConstructor;
8
import org.apache.commons.validator.routines.EmailValidator;
9
import org.apache.log4j.Logger;
10
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Value;
12
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
13

  
14
import javax.mail.MessagingException;
15
import javax.servlet.ServletConfig;
16
import javax.servlet.ServletException;
17
import javax.servlet.http.HttpServlet;
18
import javax.servlet.http.HttpServletRequest;
19
import javax.servlet.http.HttpServletResponse;
20
import javax.servlet.http.HttpSession;
21
import java.io.IOException;
22
import java.sql.Timestamp;
23
import java.util.Date;
24
import java.util.UUID;
25

  
26
/**
27
 * Created by sofia on 21/5/2018.
28
 */
29
public class RequestToDeleteAccountServlet extends HttpServlet {
30

  
31
    @Autowired
32
    private VerificationActions verificationActions;
33

  
34
    @Autowired
35
    private LDAPActions ldapActions;
36

  
37
    @Autowired
38
    private EmailSender emailSender;
39

  
40
    @Value("${oidc.home}")
41
    private String oidcHomeUrl;
42

  
43
    @Value("${google.recaptcha.secret}")
44
    private String secret;
45

  
46
    @Value("${google.recaptcha.key}")
47
    private String sitekey;
48

  
49
    private static final Logger logger = Logger.getLogger(RequestActivationCodeServlet.class);
50

  
51
    public void init(ServletConfig config) throws ServletException {
52
        super.init(config);
53
        SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
54
                config.getServletContext());
55
        config.getServletContext().setAttribute("sitekey", sitekey);
56

  
57
    }
58

  
59
    @Override
60
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
61
        String formEmail = request.getParameter("email").trim();
62

  
63
        String gRecaptchaResponse = request.getParameter("g-recaptcha-response");
64

  
65
        HttpSession session = request.getSession();
66
        session.setAttribute("homeUrl", oidcHomeUrl);
67

  
68
        if (formEmail == null) {
69
            request.getSession().setAttribute("message", "Error reading email.");
70
            response.sendRedirect("./requestToDeleteAccount.jsp");
71

  
72
        } else if (formEmail.isEmpty()) {
73
            request.getSession().setAttribute("message", "Please enter your email.");
74
            response.sendRedirect("./requestToDeleteAccount.jsp");
75

  
76
        } else if (!EmailValidator.getInstance().isValid(formEmail)) {
77
            request.getSession().setAttribute("message", "Please enter a valid email.");
78
            response.sendRedirect("./requestToDeleteAccount.jsp");
79

  
80
        } else if (!VerifyRecaptcha.verify(gRecaptchaResponse, secret)) {
81
            request.getSession().setAttribute("reCAPTCHA_message", "You missed the reCAPTCHA validation!");
82
            response.sendRedirect("./requestToDeleteAccount.jsp");
83

  
84
        } else {
85

  
86
            try {
87

  
88
                Boolean isRegistered = false;
89
                Boolean isZombie = false;
90

  
91
                if (ldapActions.emailExists(formEmail)) {
92
                    logger.info("User with email: " + formEmail + " is activated user!");
93
                    isRegistered = true;
94
                } else if (ldapActions.isZombieUsersEmail(formEmail)) {
95
                    logger.info("User with email: " + formEmail + " is zombie user!");
96
                    isZombie = true;
97
                }
98

  
99
                if (!isRegistered && !isZombie) {
100
                    request.getSession().setAttribute("message", "There is no user with that email.");
101
                    response.sendRedirect("./requestToDeleteAccount.jsp");
102
                } else {
103

  
104
                    String username = null;
105

  
106
                    if (isRegistered) {
107
                        username = ldapActions.getUsername(formEmail);
108
                    } else if (isZombie) {
109
                        username = ldapActions.getZombieUsersUserName(formEmail);
110
                    }
111

  
112
                    UUID verificationCode = UUID.randomUUID();
113
                    Date creationDate = new Date();
114
                    String vCode = verificationCode.toString();
115

  
116
                    Timestamp timestamp = new Timestamp(creationDate.getTime());
117

  
118
                    if (!verificationActions.verificationEntryExists(username)) {
119
                        verificationActions.addVerificationEntry(username, vCode, timestamp);
120

  
121
                    } else {
122
                        verificationActions.updateVerificationEntry(username, vCode, timestamp);
123
                    }
124

  
125
                    String resultPath = UrlConstructor.getRedirectUrl(request, "verifyToDelete.jsp");
126
                    String resultPathWithVCode = UrlConstructor.getVerificationLink(resultPath, vCode);
127

  
128
                    String verificationCodeMsg = "<p>Hello " + username + ",</p>" +
129
                            "<p> A request has been made to get a verification code to delete your OpenAIRE account. To delete your " +
130
                            "account, you will need to submit your username and this verification code in order to verify that the " +
131
                            "request was legitimate.</p>" +
132
                            "<p>" +
133
                            "The verification code is " + vCode +
134
                            "</p>" +
135
                            "Click the URL below and proceed with deleting your account." +
136
                            "<p><a href=" + resultPathWithVCode + ">" + resultPathWithVCode + "</a></p>" +
137
                            "<p>The verification code is valid for 24 hours.</p>" +
138
                            "<p>Thank you,</p>" +
139
                            "<p>OpenAIRE technical team</p>";
140

  
141
                    String verificationCodeSubject = "Request to delete your OpenAIRE account";
142

  
143
                    emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg);
144
                    logger.info("Sending verification code to user: " + formEmail);
145

  
146

  
147
                    response.sendRedirect("./verifyToDelete.jsp");
148
                }
149
            } catch (MessagingException e) {
150
                logger.error("Error in sending email", e);
151
                request.getSession().setAttribute("message", "Error sending email");
152
                response.sendRedirect("./requestActivationCode.jsp");
153
            } catch (Exception ldape) {
154
                logger.error("Could not user with email " + formEmail, ldape);
155
                response.sendRedirect(UrlConstructor.getRedirectUrl(request, "error.jsp"));
156
            }
157
        }
158
    }
159

  
160
    public String getOidcHomeUrl() {
161
        return oidcHomeUrl;
162
    }
163

  
164
    public void setOidcHomeUrl(String oidcHomeUrl) {
165
        this.oidcHomeUrl = oidcHomeUrl;
166
    }
167
}
modules/dnet-openaire-users/trunk/src/main/webapp/verifyToDelete.jsp
1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2
<%--
3
  Created by IntelliJ IDEA.
4
  User: sofia
5
  Date: 21/5/2018
6
  Time: 2:45 μμ
7
  To change this template use File | Settings | File Templates.
8
--%>
9
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
10
<html>
11
<head>
12
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
13
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
14
    <meta name="viewport" content="width=device-width, initial-scale=1">
15
    <base href=".">
16
    <script src="./js/jquery.js"></script>
17
    <script src="./js/uikit.js"></script>
18
    <script src="./js/validation.js"></script>
19
    <link rel="stylesheet" style="text/css" href="./css/theme.css">
20
    <link rel="stylesheet" style="text/css" href="./css/custom.css">
21
    <link rel="stylesheet" style="text/css" href="./css/aai-custom.css">
22
    <title>OpenAIRE - Verification to delete your account</title>
23
</head>
24
<body class="" style="">
25
<div class="uk-offcanvas-content uk-height-viewport">
26
    <!-- MENU STARTS HERE -->
27
    <!-- MAIN MENU STARTS HERE -->
28
    <div class="tm-header  tm-header-transparent" uk-header="">
29
        <div class="uk-container uk-container-expand">
30
            <nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
31
                <div class="uk-navbar-center">
32
                    <div class="uk-logo uk-navbar-item">
33
                        <img alt="OpenAIRE" class="uk-responsive-height" src="./images/Logo_Horizontal.png">
34
                    </div>
35
                </div>
36
            </nav>
37
        </div>
38
    </div>
39
    <!-- MENU ENDS HERE -->
40
    <!-- CONTENT STARTS HERE -->
41
    <div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
42
        <div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid="">
43
        </div>
44
    </div>
45
    <div class=" uk-section  uk-margin-small-top tm-middle custom-main-content" id="tm-main">
46
        <div class="uk-container uk-container-small uk-margin-medium-top  uk-margin-small-bottom uk-text-center">
47
            <div uk-grid="" class="uk-grid uk-grid-stack">
48
                <div class="tm-main uk-width-1-2@s uk-width-1-1@m  uk-width-1-1@l uk-row-first uk-first-column uk-align-center">
49
                    <div class="uk-grid ">
50
                        <!-- CENTER SIDE -->
51
                        <div class="uk-width-1-1@m uk-width-1-1@s uk-text-center">
52
                            <div class="middle-box text-center loginscreen animated fadeInDown ">
53
                                <p>An email has been sent to your email address. The email contains a verification code, please paste the verification code in the field below to delete your account.</p>
54
                                <div class="uk-width-1-3@m uk-align-center">
55
                                    <!-- Validate form -->
56
                                    <div id="registerForm">
57
                                        <form action="verifyToDelete" method="POST" role="form" class="m-t" id="register_form">
58
                                            <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
59
                                            <div class="alert alert-success" aria-hidden="true" style="display: none;"></div>
60
                                            <div class="alert alert-danger" aria-hidden="true" style="display: none;"></div>
61
                                            <div class="form-group">
62
                                                <span id="server_error" class="uk-text-danger uk-text-small uk-float-left">${message}</span>
63
                                                <c:remove var="message" scope="session" />
64
                                                <span id="server_username_error" class="uk-text-danger uk-text-small uk-float-left">${msg_username_error}</span>
65
                                                <c:remove var="msg_username_error" scope="session" />
66
                                                <input id="username" name="username" type="text" placeholder="Username" class="form-control">
67
                                            </div>
68
                                            <div class="form-group">
69
                                                <span id="server_verification_code_error" class="uk-text-danger uk-text-small uk-float-left">${msg_verification_code_error}</span>
70
                                                <c:remove var="msg_verification_code_error" scope="session" />
71
                                                <input id="verification_code" name="verification_code" type="text" placeholder="Verification Code" value="${param.code}" class="form-control">
72
                                            </div>
73
                                            <div class="uk-margin uk-grid-small uk-child-width-auto uk-grid uk-text-left uk-grid-stack" uk-grid="">
74
                                                <div class="uk-width-1-1 uk-grid-margin uk-first-column">
75
                                                    <button type="submit" class="uk-button uk-button-danger" onclick="return validateForm();">Delete Account</button>
76
                                                </div>
77
                                            </div>
78
                                        </form>
79
                                    </div>
80
                                    <!-- END OF REGISTER FORM -->
81
                                    <script>
82
                                        $("#username").focusin(function() {
83
                                            $(this).removeClass('aai-form-danger');
84
                                            $("#server_username_error").fadeOut();
85
                                            $("#server_error").fadeOut();
86
                                        });
87

  
88
                                        $("#verification_code").focusin(function() {
89
                                            $(this).removeClass('aai-form-danger');
90
                                            $("#server_verification_code_error").fadeOut();
91
                                            $("#server_error").fadeOut();
92
                                        });
93
                                    </script>
94
                                </div>
95
                                </ul>
96
                            </div>
97
                        </div>
98
                        <!-- END OF CENTER SIDE -->
99
                    </div>
100
                </div>
101
            </div>
102
        </div>
103
    </div>
104
    <!-- CONTENT ENDS HERE -->
105
    <!-- FOOTER STARTS HERE-->
106
    <div class="custom-footer"  style="z-index: 200;">
107
        <div class="uk-section-primary uk-section uk-section-small">
108
            <div class="uk-container">
109
                <div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
110
                    <div class="uk-width-1-1@m uk-first-column">
111
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-center">
112
                            <img alt="OpenAIRE" class="el-image" src="./images/Logo_Horizontal_white_small.png">
113
                        </div>
114
                        <div class="footer-license uk-margin uk-margin-remove-bottom uk-text-center uk-text-lead">
115
                            <div><a href="http://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license"><img alt="Creative" src="./images/80x15.png" style="height: auto; max-width: 100%; vertical-align: middle;"></a>&nbsp;UNLESS OTHERWISE INDICATED, ALL MATERIALS CREATED BY THE OPENAIRE CONSORTIUM ARE LICENSED UNDER A&nbsp;<a href="http://creativecommons.org/licenses/by/4.0/" rel="license">CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE</a>.</div>
116
                            <div>OPENAIRE IS POWERED BY&nbsp;<a href="http://www.d-net.research-infrastructures.eu/">D-NET</a>.</div>
117
                        </div>
118
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right">
119
                            <a class="uk-totop uk-icon" href="#" uk-scroll="" uk-totop="">
120
                            </a>
121
                        </div>
122
                    </div>
123
                </div>
124
            </div>
125
        </div>
126
    </div>
127
    <!-- FOOTER ENDS HERE -->
128
</div>
129
</body>
130
</html>
modules/dnet-openaire-users/trunk/src/main/webapp/requestToDeleteAccount.jsp
1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2
<%--
3
  Created by IntelliJ IDEA.
4
  User: sofia
5
  Date: 21/5/2018
6
  Time: 1:21 μμ
7
  To change this template use File | Settings | File Templates.
8
--%>
9
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
10
<html>
11
<head>
12
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
13
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
14
    <meta name="viewport" content="width=device-width, initial-scale=1">
15
    <base href=".">
16
    <script src="./js/jquery.js"></script>
17
    <script src="./js/uikit.js"></script>
18
    <link rel="stylesheet" style="text/css" href="./css/theme.css">
19
    <link rel="stylesheet" style="text/css" href="./css/custom.css">
20
    <link rel="stylesheet" style="text/css" href="./css/aai-custom.css">
21
    <script src='https://www.google.com/recaptcha/api.js'></script>
22
    <title>OpenAIRE - Request to Delete Account</title>
23
</head>
24
<body>
25

  
26
<div class="uk-offcanvas-content uk-height-viewport">
27
    <!-- MENU STARTS HERE -->
28
    <!-- MAIN MENU STARTS HERE -->
29
    <div class="tm-header  tm-header-transparent" uk-header="">
30
        <div class="uk-container uk-container-expand">
31
            <nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
32
                <div class="uk-navbar-center">
33
                    <div class="uk-logo uk-navbar-item">
34
                        <img alt="OpenAIRE" class="uk-responsive-height" src="./images/Logo_Horizontal.png">
35
                    </div>
36
                </div>
37
            </nav>
38
        </div>
39
    </div>
40
    <!-- MENU ENDS HERE -->
41
    <!-- CONTENT STARTS HERE -->
42
    <div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
43
        <div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid="">
44
        </div>
45
    </div>
46
    <div class=" uk-section  uk-margin-small-top tm-middle custom-main-content" id="tm-main">
47
        <div class="uk-container uk-container-small uk-margin-medium-top  uk-margin-small-bottom uk-text-center">
48
            <h2 class="uk-h2 uk-margin-small-bottom">Request to delete your account</h2>
49
            <div uk-grid="" class="uk-grid uk-grid-stack">
50
                <div class="tm-main uk-width-1-2@s uk-width-1-1@m  uk-width-1-1@l uk-row-first uk-first-column uk-align-center">
51
                    <div class="uk-grid ">
52
                        <!-- CENTER SIDE -->
53
                        <div class="uk-width-1-1@m uk-width-1-1@s uk-text-center">
54
                            <div class="middle-box text-center loginscreen animated fadeInDown ">
55
                                <p>Please enter your email. We will send you an email with a verification code to delete your account.</p>
56
                                <div class="uk-width-1-3@m uk-align-center">
57
                                    <!-- REQUEST A VERIFICATION CODE FORM -->
58
                                    <div id="registerForm">
59
                                        <form action="requestToDeleteAccount" method="POST" role="form" class="m-t" id="register_form">
60
                                            <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
61
                                            <div class="alert alert-success" aria-hidden="true" style="display: none;"></div>
62
                                            <div class="alert alert-danger" aria-hidden="true" style="display: none;"></div>
63
                                            <div class="form-group">
64
                                                <span id="server_error" class="uk-text-danger uk-text-small uk-float-left">${message}</span>
65
                                                <c:remove var="message" scope="session" />
66
                                                <span class="msg_email_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your email.</span>
67
                                                <input id="email" name="email" type="text" placeholder="Email" class="form-control"></div>
68
                                            <div class="uk-margin uk-grid-small uk-child-width-auto uk-grid uk-text-left uk-grid-stack" uk-grid="">
69
                                                <span id="server_error" class="uk-text-danger uk-text-small uk-float-left">${reCAPTCHA_message}</span>
70
                                                <c:remove var="reCAPTCHA_message" scope="session" />
71
                                                <div class="uk-width-1-1 uk-grid-margin uk-first-column">
72
                                                    <div class="g-recaptcha" data-sitekey=${applicationScope.sitekey}></div>
73
                                                </div>
74
                                                <div class="uk-width-1-1 uk-grid-margin uk-first-column">
75
                                                    <button type="submit" class="uk-button uk-button-primary" onclick="return validateForm();">Submit</button>
76
                                                </div>
77
                                            </div>
78
                                        </form>
79
                                    </div>
80
                                    <script>
81
                                        $("#email").focusin(function() {
82
                                            $(this).removeClass('aai-form-danger');
83
                                            $("#server_error").fadeOut();
84
                                            $(".msg_email_error").fadeOut();
85
                                        });
86
                                    </script>
87
                                    <!-- END OF REQUEST A VERIFICATION CODE FORM -->
88
                                </div>
89
                                </ul>
90
                            </div>
91
                        </div>
92
                        <!-- END OF CENTER SIDE -->
93
                    </div>
94
                </div>
95
            </div>
96
        </div>
97
    </div>
98
    <!-- CONTENT ENDS HERE -->
99
    <!-- FOOTER STARTS HERE-->
100
    <div class="custom-footer"  style="z-index: 200;">
101
        <div class="uk-section-primary uk-section uk-section-small">
102
            <div class="uk-container">
103
                <div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
104
                    <div class="uk-width-1-1@m uk-first-column">
105
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-center">
106
                            <img alt="OpenAIRE" class="el-image" src="./images/Logo_Horizontal_white_small.png">
107
                        </div>
108
                        <div class="footer-license uk-margin uk-margin-remove-bottom uk-text-center uk-text-lead">
109
                            <div><a href="http://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license"><img alt="Creative" src="./images/80x15.png" style="height: auto; max-width: 100%; vertical-align: middle;"></a>&nbsp;UNLESS OTHERWISE INDICATED, ALL MATERIALS CREATED BY THE OPENAIRE CONSORTIUM ARE LICENSED UNDER A&nbsp;<a href="http://creativecommons.org/licenses/by/4.0/" rel="license">CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE</a>.</div>
110
                            <div>OPENAIRE IS POWERED BY&nbsp;<a href="http://www.d-net.research-infrastructures.eu/">D-NET</a>.</div>
111
                        </div>
112
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right">
113
                            <a class="uk-totop uk-icon" href="#" uk-scroll="" uk-totop="">
114
                            </a>
115
                        </div>
116
                    </div>
117
                </div>
118
            </div>
119
        </div>
120
    </div> <!-- FOOTER ENDS HERE -->
121
</div>
122
</body>
123
</html>
modules/dnet-openaire-users/trunk/src/main/webapp/successDeleteAccount.jsp
1
<%--
2
  Created by IntelliJ IDEA.
3
  User: sofia
4
  Date: 21/5/2018
5
  Time: 5:07 μμ
6
  To change this template use File | Settings | File Templates.
7
--%>
8
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
9
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
10
<% if (session.getAttribute("successDeleteAccount") == null) {
11
    String redirectURL = request.getContextPath() + "/error404.jsp";
12
    response.sendRedirect(redirectURL);
13

  
14
} else if (session.getAttribute("successDeleteAccount")!=null) {
15
    session.removeAttribute("successDeleteAccount");
16
}
17
%>
18
<html>
19
<head>
20
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
21
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
22
    <meta name="viewport" content="width=device-width, initial-scale=1">
23
    <script src="./js/jquery.js"></script>
24
    <script src="./js/uikit.js"></script>
25
    <script src="./js/validation.js"></script>
26
    <link rel="stylesheet" style="text/css" href="./css/theme.css">
27
    <link rel="stylesheet" style="text/css" href="./css/custom.css">
28
    <link rel="stylesheet" style="text/css" href="./css/aai-custom.css">
29
    <title>OpenAIRE - Success </title>
30
</head>
31
<body class="" style="">
32
<div class="uk-offcanvas-content uk-height-viewport">
33
    <!-- MENU STARTS HERE -->
34
    <!-- MAIN MENU STARTS HERE -->
35
    <div class="tm-header  tm-header-transparent" uk-header="">
36
        <div class="uk-container uk-container-expand">
37
            <nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
38
                <div class="uk-navbar-center">
39
                    <div class="uk-logo uk-navbar-item">
40
                        <img alt="OpenAIRE" class="uk-responsive-height" src="./images/Logo_Horizontal.png">
41
                    </div>
42
                </div>
43
            </nav>
44
        </div>
45
    </div>
46
    <!-- MENU ENDS HERE -->
47
    <!-- CONTENT STARTS HERE -->
48
    <div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
49
        <div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid="">
50
        </div>
51
    </div>
52
    <div class=" uk-section  uk-margin-small-top tm-middle custom-main-content" id="tm-main">
53
        <div class="uk-container uk-container-small uk-margin-medium-top  uk-margin-small-bottom uk-text-center">
54
            <%--<h2 class="uk-h2 uk-margin-small-bottom">Forgot Password</h2>--%>
55
            <div uk-grid="" class="uk-grid uk-grid-stack">
56
                <div class="tm-main uk-width-1-2@s uk-width-1-1@m  uk-width-1-1@l uk-row-first uk-first-column uk-align-center">
57
                    <div class="uk-grid ">
58
                        <!-- CENTER SIDE -->
59
                        <div class="uk-width-1-1@m uk-width-1-1@s uk-text-center">
60
                            <!-- <h3 class="uk-h3">Create an account</h3> -->
61
                            <div class="middle-box text-center loginscreen animated fadeInDown ">
62
                                <h3 class="uk-h4 uk-text-success">Your account has been successfully deleted!</h3>
63
                                <h4 class="uk-h4">We hope to see you again!</h4>
64
                                <div class="uk-width-1-3@m uk-align-center">
65

  
66
                                </div>
67
                                </ul>
68
                            </div>
69
                        </div>
70
                        <!-- END OF CENTER SIDE -->
71
                    </div>
72
                </div>
73
            </div>
74
        </div>
75
    </div>
76
    <!-- CONTENT ENDS HERE -->
77
    <!-- FOOTER STARTS HERE-->
78
    <div class="custom-footer"  style="z-index: 200;">
79
        <div class="uk-section-primary uk-section uk-section-small">
80
            <div class="uk-container">
81
                <div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
82
                    <div class="uk-width-1-1@m uk-first-column">
83
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-center">
84
                            <img alt="OpenAIRE" class="el-image" src="./images/Logo_Horizontal_white_small.png">
85
                        </div>
86
                        <div class="footer-license uk-margin uk-margin-remove-bottom uk-text-center uk-text-lead">
87
                            <div><a href="http://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license"><img alt="Creative" src="./images/80x15.png" style="height: auto; max-width: 100%; vertical-align: middle;"></a>&nbsp;UNLESS OTHERWISE INDICATED, ALL MATERIALS CREATED BY THE OPENAIRE CONSORTIUM ARE LICENSED UNDER A&nbsp;<a href="http://creativecommons.org/licenses/by/4.0/" rel="license">CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE</a>.</div>
88
                            <div>OPENAIRE IS POWERED BY&nbsp;<a href="http://www.d-net.research-infrastructures.eu/">D-NET</a>.</div>
89
                        </div>
90
                        <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right">
91
                            <a class="uk-totop uk-icon" href="#" uk-scroll="" uk-totop="">
92
                            </a>
93
                        </div>
94
                    </div>
95
                </div>
96
            </div>
97
        </div>
98
    </div> <!-- FOOTER ENDS HERE -->
99
</div>
100
</body>
101
</html>

Also available in: Unified diff