author | František Kučera <franta-hg@frantovo.cz> |
Thu, 04 Mar 2010 14:09:21 +0100 | |
changeset 52 | 4c0408690ebf |
parent 51 | d01685a7e07d |
child 53 | d76be0124c40 |
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@51 | 6 |
version="2.0"> |
franta-hg@51 | 7 |
|
franta-hg@51 | 8 |
<jsp:useBean id="uzivatel" class="cz.frantovo.nekurak.dto.Uzivatel" scope="request"/> |
franta-hg@51 | 9 |
<jsp:useBean id="uzivatelPredRegistraci" class="cz.frantovo.nekurak.web.UzivatelPredRegistraci" scope="request"/> |
franta-hg@51 | 10 |
<jsp:useBean id="registraceUzivatele" class="cz.frantovo.nekurak.web.RegistraceUzivatele" scope="session"/> |
franta-hg@51 | 11 |
|
franta-hg@51 | 12 |
<h1><fmt:message key="registrace.nadpis"/></h1> |
franta-hg@51 | 13 |
|
franta-hg@52 | 14 |
<!-- |
franta-hg@52 | 15 |
Registrace probíhá ve třech krocích: |
franta-hg@52 | 16 |
1) uživatel vyplňí formulář |
franta-hg@52 | 17 |
2) zobrazíme mu vyplněné údaje a on si je zkontroluje |
franta-hg@52 | 18 |
3) potvrdí registraci |
franta-hg@52 | 19 |
--> |
franta-hg@52 | 20 |
|
franta-hg@51 | 21 |
<c:choose> |
franta-hg@51 | 22 |
<c:when test="${param.akceRegistrace == 'kontrola'}"> |
franta-hg@52 | 23 |
<!-- Vypíšeme uživateli údaje, které zadal do formuláře, aby si je mohl zkontrolovat. --> |
franta-hg@51 | 24 |
<jsp:setProperty name="uzivatel" property="*"/> |
franta-hg@51 | 25 |
<jsp:setProperty name="uzivatelPredRegistraci" property="uzivatel" value="${uzivatel}"/> |
franta-hg@51 | 26 |
<jsp:setProperty name="registraceUzivatele" property="uzivatel" value="${uzivatelPredRegistraci}"/> |
franta-hg@51 | 27 |
|
franta-hg@51 | 28 |
<p><fmt:message key="registrace.kontrola"/></p> |
franta-hg@51 | 29 |
|
franta-hg@51 | 30 |
<p> |
franta-hg@51 | 31 |
<fmt:message key="dto.uzivatel.prezdivka"/>: <c:out value="${uzivatel.prezdivka}"/><br/> |
franta-hg@51 | 32 |
<fmt:message key="dto.uzivatel.jmeno"/>: <c:out value="${uzivatel.jmeno}"/><br/> |
franta-hg@51 | 33 |
<fmt:message key="dto.uzivatel.prijmeni"/>: <c:out value="${uzivatel.prijmeni}"/><br/> |
franta-hg@51 | 34 |
<fmt:message key="dto.uzivatel.email"/>: <c:out value="${uzivatel.email}"/><br/> |
franta-hg@51 | 35 |
</p> |
franta-hg@51 | 36 |
|
franta-hg@51 | 37 |
<p> |
franta-hg@51 | 38 |
<a href="?akce=registrovatUzivatele&amp;akceRegistrace=dokonceni&amp;token=${fn:escapeXml(uzivatelPredRegistraci.token)}"> |
franta-hg@51 | 39 |
<fmt:message key="registrace.potvrdit"/> |
franta-hg@51 | 40 |
</a> |
franta-hg@51 | 41 |
</p> |
franta-hg@51 | 42 |
|
franta-hg@51 | 43 |
</c:when> |
franta-hg@51 | 44 |
<c:when test="${param.akceRegistrace == 'dokonceni'}"> |
franta-hg@52 | 45 |
<!-- Uživatel si zkontroloval údaje a chce dokončit svoji registraci. --> |
franta-hg@51 | 46 |
<jsp:setProperty name="registraceUzivatele" property="token" value="${param.token}"/> |
franta-hg@51 | 47 |
|
franta-hg@52 | 48 |
<c:set var="chybaRegistrace" value="${registraceUzivatele.dokonciRegistraci}"/> |
franta-hg@52 | 49 |
|
franta-hg@51 | 50 |
<c:choose> |
franta-hg@52 | 51 |
<c:when test="${chybaRegistrace == null}"> |
franta-hg@52 | 52 |
<!-- Registrace proběhla úspěšně. --> |
franta-hg@51 | 53 |
<p> |
franta-hg@51 | 54 |
<fmt:message key="registrace.hotovo"/>&#160; |
franta-hg@51 | 55 |
<a href="?akce=prihlaseni"> |
franta-hg@51 | 56 |
<fmt:message key="registrace.hotovo.prihlasit"/> |
franta-hg@51 | 57 |
</a> |
franta-hg@51 | 58 |
</p> |
franta-hg@51 | 59 |
</c:when> |
franta-hg@51 | 60 |
<c:otherwise> |
franta-hg@52 | 61 |
<!-- Během pokusu o registraci uživatele došlo k chybě. --> |
franta-hg@52 | 62 |
<p class="chybovaHlaska"><fmt:message key="${chybaRegistrace}"/></p> |
franta-hg@51 | 63 |
</c:otherwise> |
franta-hg@51 | 64 |
</c:choose> |
franta-hg@51 | 65 |
</c:when> |
franta-hg@51 | 66 |
<c:otherwise> |
franta-hg@52 | 67 |
<!-- Zobrazíme uživateli registrační formulář. --> |
franta-hg@51 | 68 |
<form method="post" action="?akce=registrovatUzivatele&amp;akceRegistrace=kontrola"> |
franta-hg@51 | 69 |
<fieldset> |
franta-hg@51 | 70 |
<fmt:message key="dto.uzivatel.prezdivka.tip" var="prezdivkaTip"/> |
franta-hg@51 | 71 |
<label title="${prezdivkaTip}"><fmt:message key="dto.uzivatel.prezdivka"/>: <input type="text" name="prezdivka" maxlength="255"/></label><br/> |
franta-hg@51 | 72 |
<label><fmt:message key="dto.uzivatel.heslo"/>: <input type="password" name="heslo" maxlength="255"/></label><br/> |
franta-hg@51 | 73 |
<label><fmt:message key="dto.uzivatel.heslo.kontrola"/>: <input type="password" name="heslo_kontrola" maxlength="255"/></label><br/> |
franta-hg@51 | 74 |
<br/> |
franta-hg@51 | 75 |
<label><fmt:message key="dto.uzivatel.jmeno"/>: <input type="text" name="jmeno" maxlength="255"/></label><br/> |
franta-hg@51 | 76 |
<label><fmt:message key="dto.uzivatel.prijmeni"/>: <input type="text" name="prijmeni" maxlength="255"/></label><br/> |
franta-hg@51 | 77 |
<label><fmt:message key="dto.uzivatel.email"/>: <input type="text" name="email" maxlength="255"/></label><br/> |
franta-hg@51 | 78 |
<button value="submit"><fmt:message key="registrace.tlacitko"/></button> |
franta-hg@51 | 79 |
</fieldset> |
franta-hg@51 | 80 |
</form> |
franta-hg@51 | 81 |
</c:otherwise> |
franta-hg@51 | 82 |
</c:choose> |
franta-hg@51 | 83 |
|
franta-hg@51 | 84 |
</jsp:root> |