1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/java/nekurak.net-web/web/WEB-INF/casti/registrovatUzivatele.jsp Thu Mar 04 12:02:41 2010 +0100
1.3 @@ -0,0 +1,80 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
1.6 + xmlns:c="http://java.sun.com/jsp/jstl/core"
1.7 + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
1.8 + xmlns:fn="http://java.sun.com/jsp/jstl/functions"
1.9 + version="2.0">
1.10 +
1.11 + <jsp:useBean id="uzivatel" class="cz.frantovo.nekurak.dto.Uzivatel" scope="request"/>
1.12 + <jsp:useBean id="uzivatelPredRegistraci" class="cz.frantovo.nekurak.web.UzivatelPredRegistraci" scope="request"/>
1.13 + <jsp:useBean id="registraceUzivatele" class="cz.frantovo.nekurak.web.RegistraceUzivatele" scope="session"/>
1.14 +
1.15 + <h1><fmt:message key="registrace.nadpis"/></h1>
1.16 +
1.17 + <c:choose>
1.18 + <c:when test="${param.akceRegistrace == 'kontrola'}">
1.19 + <jsp:setProperty name="uzivatel" property="*"/>
1.20 + <jsp:setProperty name="uzivatelPredRegistraci" property="uzivatel" value="${uzivatel}"/>
1.21 + <jsp:setProperty name="registraceUzivatele" property="uzivatel" value="${uzivatelPredRegistraci}"/>
1.22 +
1.23 + <p><fmt:message key="registrace.kontrola"/></p>
1.24 +
1.25 + <p>
1.26 + <fmt:message key="dto.uzivatel.prezdivka"/>: <c:out value="${uzivatel.prezdivka}"/><br/>
1.27 + <fmt:message key="dto.uzivatel.jmeno"/>: <c:out value="${uzivatel.jmeno}"/><br/>
1.28 + <fmt:message key="dto.uzivatel.prijmeni"/>: <c:out value="${uzivatel.prijmeni}"/><br/>
1.29 + <fmt:message key="dto.uzivatel.email"/>: <c:out value="${uzivatel.email}"/><br/>
1.30 + </p>
1.31 +
1.32 + <p>
1.33 + <a href="?akce=registrovatUzivatele&amp;akceRegistrace=dokonceni&amp;token=${fn:escapeXml(uzivatelPredRegistraci.token)}">
1.34 + <fmt:message key="registrace.potvrdit"/>
1.35 + </a>
1.36 + </p>
1.37 +
1.38 + </c:when>
1.39 + <c:when test="${param.akceRegistrace == 'dokonceni'}">
1.40 +
1.41 + <jsp:setProperty name="registraceUzivatele" property="token" value="${param.token}"/>
1.42 +
1.43 + <c:choose>
1.44 + <c:when test="${registraceUzivatele.dokonciRegistraci}">
1.45 + <p>
1.46 + <fmt:message key="registrace.hotovo"/>&#160;
1.47 + <a href="?akce=prihlaseni">
1.48 + <fmt:message key="registrace.hotovo.prihlasit"/>
1.49 + </a>
1.50 + </p>
1.51 + </c:when>
1.52 + <c:otherwise>
1.53 + <!--
1.54 + Zaznamenali jsme pokus o CSRF nebo vypršela relace
1.55 + a uživatel se pokouší dokončit registraci po dlouhé době.
1.56 + -->
1.57 + <p><fmt:message key="registrace.chybnyToken"/></p>
1.58 + </c:otherwise>
1.59 + </c:choose>
1.60 +
1.61 +
1.62 + </c:when>
1.63 + <c:otherwise>
1.64 + <form method="post" action="?akce=registrovatUzivatele&amp;akceRegistrace=kontrola">
1.65 + <fieldset>
1.66 + <fmt:message key="dto.uzivatel.prezdivka.tip" var="prezdivkaTip"/>
1.67 + <label title="${prezdivkaTip}"><fmt:message key="dto.uzivatel.prezdivka"/>: <input type="text" name="prezdivka" maxlength="255"/></label><br/>
1.68 + <label><fmt:message key="dto.uzivatel.heslo"/>: <input type="password" name="heslo" maxlength="255"/></label><br/>
1.69 + <label><fmt:message key="dto.uzivatel.heslo.kontrola"/>: <input type="password" name="heslo_kontrola" maxlength="255"/></label><br/>
1.70 + <br/>
1.71 + <label><fmt:message key="dto.uzivatel.jmeno"/>: <input type="text" name="jmeno" maxlength="255"/></label><br/>
1.72 + <label><fmt:message key="dto.uzivatel.prijmeni"/>: <input type="text" name="prijmeni" maxlength="255"/></label><br/>
1.73 + <label><fmt:message key="dto.uzivatel.email"/>: <input type="text" name="email" maxlength="255"/></label><br/>
1.74 + <button value="submit"><fmt:message key="registrace.tlacitko"/></button>
1.75 + </fieldset>
1.76 + </form>
1.77 + </c:otherwise>
1.78 + </c:choose>
1.79 +
1.80 +
1.81 +
1.82 +
1.83 +</jsp:root>