author | František Kučera <franta-hg@frantovo.cz> |
Tue Apr 27 16:13:36 2010 +0200 (2010-04-27) | |
changeset 107 | e8371105fcc8 |
parent 73 | 34c7eb5f2fae |
child 145 | 0efefbf5f8b6 |
permissions | -rw-r--r-- |
franta-hg@51 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
franta-hg@51 | 2 |
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" |
franta-hg@51 | 3 |
xmlns:c="http://java.sun.com/jsp/jstl/core" |
franta-hg@51 | 4 |
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" |
franta-hg@51 | 5 |
xmlns:fn="http://java.sun.com/jsp/jstl/functions" |
franta-hg@73 | 6 |
xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak" |
franta-hg@51 | 7 |
version="2.0"> |
franta-hg@51 | 8 |
|
franta-hg@55 | 9 |
<jsp:useBean id="uzivatel" class="cz.frantovo.nekurak.dto.PozadavekNaRegistraciUzivatele" scope="request"/> |
franta-hg@51 | 10 |
<jsp:useBean id="uzivatelPredRegistraci" class="cz.frantovo.nekurak.web.UzivatelPredRegistraci" scope="request"/> |
franta-hg@51 | 11 |
<jsp:useBean id="registraceUzivatele" class="cz.frantovo.nekurak.web.RegistraceUzivatele" scope="session"/> |
franta-hg@51 | 12 |
|
franta-hg@73 | 13 |
<fmt:message key="registrace.nadpis" var="titulekStranky"/> |
franta-hg@73 | 14 |
<nk:stranka titulek="${titulekStranky}"> |
franta-hg@51 | 15 |
|
franta-hg@73 | 16 |
<h1><c:out value="${titulekStranky}"/></h1> |
franta-hg@73 | 17 |
|
franta-hg@73 | 18 |
<!-- |
franta-hg@73 | 19 |
Registrace probíhá ve třech krocích: |
franta-hg@52 | 20 |
1) uživatel vyplňí formulář |
franta-hg@52 | 21 |
2) zobrazíme mu vyplněné údaje a on si je zkontroluje |
franta-hg@73 | 22 |
3) potvrdí registraci |
franta-hg@73 | 23 |
--> |
franta-hg@52 | 24 |
|
franta-hg@73 | 25 |
<c:choose> |
franta-hg@73 | 26 |
<c:when test="${param.akceRegistrace == 'kontrola'}"> |
franta-hg@73 | 27 |
<!-- Vypíšeme uživateli údaje, které zadal do formuláře, aby si je mohl zkontrolovat. --> |
franta-hg@73 | 28 |
<c:choose> |
franta-hg@73 | 29 |
<c:when test="${param.heslo == param.heslo_kontrola}"> |
franta-hg@73 | 30 |
<jsp:setProperty name="uzivatel" property="*"/> |
franta-hg@82 | 31 |
<jsp:setProperty name="uzivatel" property="jazyk" value="${sessionScope['javax.servlet.jsp.jstl.fmt.locale.session']}"/> |
franta-hg@73 | 32 |
<jsp:setProperty name="uzivatelPredRegistraci" property="uzivatel" value="${uzivatel}"/> |
franta-hg@73 | 33 |
<jsp:setProperty name="registraceUzivatele" property="uzivatel" value="${uzivatelPredRegistraci}"/> |
franta-hg@51 | 34 |
|
franta-hg@73 | 35 |
<p><fmt:message key="registrace.kontrola"/></p> |
franta-hg@51 | 36 |
|
franta-hg@73 | 37 |
<p class="registraceKontrolaUdaju"> |
franta-hg@73 | 38 |
<fmt:message key="dto.uzivatel.prezdivka"/>: <c:out value="${uzivatel.prezdivka}"/><br/> |
franta-hg@73 | 39 |
<fmt:message key="dto.uzivatel.jmeno"/>: <c:out value="${uzivatel.jmeno}"/><br/> |
franta-hg@73 | 40 |
<fmt:message key="dto.uzivatel.prijmeni"/>: <c:out value="${uzivatel.prijmeni}"/><br/> |
franta-hg@73 | 41 |
<fmt:message key="dto.uzivatel.email"/>: <c:out value="${uzivatel.email}"/><br/> |
franta-hg@73 | 42 |
</p> |
franta-hg@51 | 43 |
|
franta-hg@73 | 44 |
<p> |
franta-hg@73 | 45 |
<a href="?akce=registrovatUzivatele&amp;akceRegistrace=dokonceni&amp;token=${fn:escapeXml(uzivatelPredRegistraci.token)}"> |
franta-hg@73 | 46 |
<fmt:message key="registrace.potvrdit"/> |
franta-hg@73 | 47 |
</a> |
franta-hg@73 | 48 |
</p> |
franta-hg@73 | 49 |
</c:when> |
franta-hg@73 | 50 |
<c:otherwise> |
franta-hg@73 | 51 |
<p class="chybovaHlaska"><fmt:message key="registrace.vyjimka.heslaSeNeshoduji"/></p> |
franta-hg@73 | 52 |
</c:otherwise> |
franta-hg@73 | 53 |
</c:choose> |
franta-hg@73 | 54 |
</c:when> |
franta-hg@73 | 55 |
<c:when test="${param.akceRegistrace == 'dokonceni'}"> |
franta-hg@73 | 56 |
<!-- Uživatel si zkontroloval údaje a chce dokončit svoji registraci. --> |
franta-hg@73 | 57 |
<jsp:setProperty name="registraceUzivatele" property="token" value="${param.token}"/> |
franta-hg@51 | 58 |
|
franta-hg@73 | 59 |
<c:set var="chybaRegistrace" value="${registraceUzivatele.dokonciRegistraci}"/> |
franta-hg@52 | 60 |
|
franta-hg@73 | 61 |
<c:choose> |
franta-hg@73 | 62 |
<c:when test="${chybaRegistrace == null}"> |
franta-hg@73 | 63 |
<!-- Registrace proběhla úspěšně. --> |
franta-hg@73 | 64 |
<p> |
franta-hg@73 | 65 |
<fmt:message key="registrace.hotovo"/>&#160; |
franta-hg@73 | 66 |
<a href="?akce=prihlaseni"> |
franta-hg@73 | 67 |
<fmt:message key="registrace.hotovo.prihlasit"/> |
franta-hg@73 | 68 |
</a>. |
franta-hg@73 | 69 |
</p> |
franta-hg@73 | 70 |
</c:when> |
franta-hg@73 | 71 |
<c:otherwise> |
franta-hg@73 | 72 |
<!-- Během pokusu o registraci uživatele došlo k chybě. --> |
franta-hg@73 | 73 |
<p class="chybovaHlaska"><fmt:message key="${chybaRegistrace}"/></p> |
franta-hg@73 | 74 |
</c:otherwise> |
franta-hg@73 | 75 |
</c:choose> |
franta-hg@73 | 76 |
</c:when> |
franta-hg@73 | 77 |
<c:otherwise> |
franta-hg@73 | 78 |
<!-- Zobrazíme uživateli registrační formulář. --> |
franta-hg@73 | 79 |
<form method="post" action="?akce=registrovatUzivatele&amp;akceRegistrace=kontrola"> |
franta-hg@73 | 80 |
<fieldset> |
franta-hg@73 | 81 |
<fmt:message key="dto.uzivatel.prezdivka.tip" var="prezdivkaTip"/> |
franta-hg@73 | 82 |
<label title="${prezdivkaTip}"><fmt:message key="dto.uzivatel.prezdivka"/>: <input type="text" name="prezdivka" maxlength="255"/></label><br/> |
franta-hg@73 | 83 |
<label><fmt:message key="dto.uzivatel.heslo"/>: <input type="password" name="heslo" maxlength="255"/></label><br/> |
franta-hg@73 | 84 |
<label><fmt:message key="dto.uzivatel.heslo.kontrola"/>: <input type="password" name="heslo_kontrola" maxlength="255"/></label><br/> |
franta-hg@73 | 85 |
<br/> |
franta-hg@73 | 86 |
<label><fmt:message key="dto.uzivatel.jmeno"/>: <input type="text" name="jmeno" maxlength="255"/></label><br/> |
franta-hg@73 | 87 |
<label><fmt:message key="dto.uzivatel.prijmeni"/>: <input type="text" name="prijmeni" maxlength="255"/></label><br/> |
franta-hg@73 | 88 |
<label><fmt:message key="dto.uzivatel.email"/>: <input type="text" name="email" maxlength="255"/></label><br/> |
franta-hg@73 | 89 |
<button value="submit"><fmt:message key="registrace.tlacitko"/></button> |
franta-hg@73 | 90 |
</fieldset> |
franta-hg@73 | 91 |
</form> |
franta-hg@73 | 92 |
</c:otherwise> |
franta-hg@73 | 93 |
</c:choose> |
franta-hg@73 | 94 |
|
franta-hg@73 | 95 |
</nk:stranka> |
franta-hg@51 | 96 |
|
franta-hg@51 | 97 |
</jsp:root> |