java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
author František Kučera <franta-hg@frantovo.cz>
Sun Jul 10 19:01:03 2011 +0200 (2011-07-10)
changeset 183 96abaf49fc7a
parent 145 0efefbf5f8b6
permissions -rw-r--r--
Ladící výpis CSRF u hlasování.
franta-hg@40
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@40
     2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
franta-hg@145
     3
		  xmlns:c="http://java.sun.com/jsp/jstl/core"
franta-hg@145
     4
		  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
franta-hg@145
     5
		  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
franta-hg@145
     6
		  xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak"
franta-hg@145
     7
		  version="2.0">
franta-hg@40
     8
franta-hg@145
     9
	<jsp:useBean id="podnik" class="cz.frantovo.nekurak.dto.Podnik" scope="request"/>
franta-hg@145
    10
	<jsp:useBean id="pridatPodnik" class="cz.frantovo.nekurak.web.PridatPodnik" scope="request"/>
franta-hg@40
    11
franta-hg@145
    12
	<fmt:message key="pridatPodnik.nadpis" var="titulekStranky"/>
franta-hg@145
    13
	<nk:stranka titulek="${titulekStranky}">
franta-hg@40
    14
franta-hg@145
    15
		<h1><c:out value="${titulekStranky}"/></h1>
franta-hg@40
    16
franta-hg@73
    17
		<c:choose>
franta-hg@145
    18
			<c:when test="${param.akcePridat == 'pridej'}">
franta-hg@145
    19
				<c:catch var="pridatPodnikChyba">
franta-hg@145
    20
					<jsp:setProperty name="podnik" property="*"/>
franta-hg@145
    21
					<jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
franta-hg@145
    22
					<c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
franta-hg@145
    23
				</c:catch>
franta-hg@145
    24
				<c:choose>
franta-hg@145
    25
					<c:when test="${pridatPodnikChyba == null}">
franta-hg@145
    26
						<p><fmt:message key="pridatPodnik.bylPridan"/></p>
franta-hg@145
    27
					</c:when>
franta-hg@145
    28
					<c:otherwise>
franta-hg@145
    29
						<p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
franta-hg@145
    30
					</c:otherwise>
franta-hg@145
    31
				</c:choose>
franta-hg@145
    32
			</c:when>
franta-hg@145
    33
			<c:otherwise>
franta-hg@179
    34
				<form method="post" action="${zc}?akce=pridatPodnik&amp;amp;akcePridat=pridej">
franta-hg@145
    35
					<fieldset>
franta-hg@145
    36
						<label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
franta-hg@145
    37
						<label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
franta-hg@145
    38
							<fmt:message key="dto.podnik.url.tip" var="urlTip"/>
franta-hg@145
    39
						<label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
franta-hg@145
    40
						<label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
franta-hg@145
    41
							<fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
franta-hg@145
    42
						<label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
franta-hg@145
    43
						<label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
franta-hg@145
    44
						<button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
franta-hg@145
    45
					</fieldset>
franta-hg@145
    46
				</form>
franta-hg@145
    47
			</c:otherwise>
franta-hg@73
    48
		</c:choose>
franta-hg@40
    49
franta-hg@145
    50
	</nk:stranka>
franta-hg@40
    51
franta-hg@40
    52
</jsp:root>