author | František Kučera <franta-hg@frantovo.cz> |
Tue Mar 09 20:46:54 2010 +0100 (2010-03-09) | |
changeset 61 | ddb7b4415234 |
parent 53 | d76be0124c40 |
child 73 | 34c7eb5f2fae |
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@55 | 8 |
<jsp:useBean id="uzivatel" class="cz.frantovo.nekurak.dto.PozadavekNaRegistraciUzivatele" 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@53 | 24 |
<c:choose> |
franta-hg@53 | 25 |
<c:when test="${param.heslo == param.heslo_kontrola}"> |
franta-hg@53 | 26 |
<jsp:setProperty name="uzivatel" property="*"/> |
franta-hg@53 | 27 |
<jsp:setProperty name="uzivatelPredRegistraci" property="uzivatel" value="${uzivatel}"/> |
franta-hg@53 | 28 |
<jsp:setProperty name="registraceUzivatele" property="uzivatel" value="${uzivatelPredRegistraci}"/> |
franta-hg@51 | 29 |
|
franta-hg@53 | 30 |
<p><fmt:message key="registrace.kontrola"/></p> |
franta-hg@51 | 31 |
|
franta-hg@53 | 32 |
<p class="registraceKontrolaUdaju"> |
franta-hg@53 | 33 |
<fmt:message key="dto.uzivatel.prezdivka"/>: <c:out value="${uzivatel.prezdivka}"/><br/> |
franta-hg@53 | 34 |
<fmt:message key="dto.uzivatel.jmeno"/>: <c:out value="${uzivatel.jmeno}"/><br/> |
franta-hg@53 | 35 |
<fmt:message key="dto.uzivatel.prijmeni"/>: <c:out value="${uzivatel.prijmeni}"/><br/> |
franta-hg@53 | 36 |
<fmt:message key="dto.uzivatel.email"/>: <c:out value="${uzivatel.email}"/><br/> |
franta-hg@53 | 37 |
</p> |
franta-hg@51 | 38 |
|
franta-hg@53 | 39 |
<p> |
franta-hg@53 | 40 |
<a href="?akce=registrovatUzivatele&amp;akceRegistrace=dokonceni&amp;token=${fn:escapeXml(uzivatelPredRegistraci.token)}"> |
franta-hg@53 | 41 |
<fmt:message key="registrace.potvrdit"/> |
franta-hg@53 | 42 |
</a> |
franta-hg@53 | 43 |
</p> |
franta-hg@53 | 44 |
</c:when> |
franta-hg@53 | 45 |
<c:otherwise> |
franta-hg@53 | 46 |
<p class="chybovaHlaska"><fmt:message key="registrace.vyjimka.heslaSeNeshoduji"/></p> |
franta-hg@53 | 47 |
</c:otherwise> |
franta-hg@53 | 48 |
</c:choose> |
franta-hg@51 | 49 |
</c:when> |
franta-hg@51 | 50 |
<c:when test="${param.akceRegistrace == 'dokonceni'}"> |
franta-hg@52 | 51 |
<!-- Uživatel si zkontroloval údaje a chce dokončit svoji registraci. --> |
franta-hg@51 | 52 |
<jsp:setProperty name="registraceUzivatele" property="token" value="${param.token}"/> |
franta-hg@51 | 53 |
|
franta-hg@52 | 54 |
<c:set var="chybaRegistrace" value="${registraceUzivatele.dokonciRegistraci}"/> |
franta-hg@52 | 55 |
|
franta-hg@51 | 56 |
<c:choose> |
franta-hg@52 | 57 |
<c:when test="${chybaRegistrace == null}"> |
franta-hg@52 | 58 |
<!-- Registrace proběhla úspěšně. --> |
franta-hg@51 | 59 |
<p> |
franta-hg@51 | 60 |
<fmt:message key="registrace.hotovo"/>&#160; |
franta-hg@51 | 61 |
<a href="?akce=prihlaseni"> |
franta-hg@51 | 62 |
<fmt:message key="registrace.hotovo.prihlasit"/> |
franta-hg@53 | 63 |
</a>. |
franta-hg@51 | 64 |
</p> |
franta-hg@51 | 65 |
</c:when> |
franta-hg@51 | 66 |
<c:otherwise> |
franta-hg@52 | 67 |
<!-- Během pokusu o registraci uživatele došlo k chybě. --> |
franta-hg@52 | 68 |
<p class="chybovaHlaska"><fmt:message key="${chybaRegistrace}"/></p> |
franta-hg@51 | 69 |
</c:otherwise> |
franta-hg@51 | 70 |
</c:choose> |
franta-hg@51 | 71 |
</c:when> |
franta-hg@51 | 72 |
<c:otherwise> |
franta-hg@52 | 73 |
<!-- Zobrazíme uživateli registrační formulář. --> |
franta-hg@51 | 74 |
<form method="post" action="?akce=registrovatUzivatele&amp;akceRegistrace=kontrola"> |
franta-hg@51 | 75 |
<fieldset> |
franta-hg@51 | 76 |
<fmt:message key="dto.uzivatel.prezdivka.tip" var="prezdivkaTip"/> |
franta-hg@51 | 77 |
<label title="${prezdivkaTip}"><fmt:message key="dto.uzivatel.prezdivka"/>: <input type="text" name="prezdivka" maxlength="255"/></label><br/> |
franta-hg@51 | 78 |
<label><fmt:message key="dto.uzivatel.heslo"/>: <input type="password" name="heslo" maxlength="255"/></label><br/> |
franta-hg@51 | 79 |
<label><fmt:message key="dto.uzivatel.heslo.kontrola"/>: <input type="password" name="heslo_kontrola" maxlength="255"/></label><br/> |
franta-hg@51 | 80 |
<br/> |
franta-hg@51 | 81 |
<label><fmt:message key="dto.uzivatel.jmeno"/>: <input type="text" name="jmeno" maxlength="255"/></label><br/> |
franta-hg@51 | 82 |
<label><fmt:message key="dto.uzivatel.prijmeni"/>: <input type="text" name="prijmeni" maxlength="255"/></label><br/> |
franta-hg@51 | 83 |
<label><fmt:message key="dto.uzivatel.email"/>: <input type="text" name="email" maxlength="255"/></label><br/> |
franta-hg@51 | 84 |
<button value="submit"><fmt:message key="registrace.tlacitko"/></button> |
franta-hg@51 | 85 |
</fieldset> |
franta-hg@51 | 86 |
</form> |
franta-hg@51 | 87 |
</c:otherwise> |
franta-hg@51 | 88 |
</c:choose> |
franta-hg@51 | 89 |
|
franta-hg@51 | 90 |
</jsp:root> |