View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-demos/hippo-go-green/trunk/site/src/main/webapp/WEB-INF/jsp/easyforms/formtemplate.jsp
Revision: 30780
Committed: Fri Oct 21 08:43:36 2011 UTC (8 years, 11 months ago) by evanegmond
File size: 6330 byte(s)
Log Message:
[GOGREEN-662] added a clearfix in the css and the jsp. The contact form looks good now.

File Contents

# Content
1 <%--
2
3 Copyright (C) 2010 Hippo B.V.
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17 --%>
18
19 <%@include file="../includes/tags.jspf" %>
20
21 <%--@elvariable id="form" type="org.onehippo.forge.easyforms.model.Form"--%>
22 <%--@elvariable id="likert" type="org.onehippo.forge.easyforms.model.Likert"--%>
23 <%--@elvariable id="ef_errors" type="java.util.List"--%>
24 <%--@elvariable id="error" type="org.onehippo.forge.easyforms.model.ErrorMessage"--%>
25 <c:choose>
26 <c:when test="${success eq 'eventsuccess'}">
27 <fmt:message key="easyforms.formtemplate.thankyou.event"/>
28 </c:when>
29 <c:when test="${success eq 'dummysuccess'}">
30 <div id="content">
31 <fmt:message key="easyforms.formtemplate.thankyou.form"/>
32 </div>
33 </c:when>
34 <c:otherwise>
35 <c:forEach items="${ef_errors}" var="error">
36 <div class="form-error"><c:out value="${error.message}"/></div>
37 </c:forEach>
38 <form class="form" action="<hst:actionURL />" method="post" id="${form.id}">
39 <c:forEach var="field" items="${form.fields}">
40 <c:choose>
41 <c:when test="${field.simpleText}">
42 <div class="ef-text">
43 <h2><c:out value="${field.label}"/></h2>
44
45 <p><c:out value="${field.hint}"/></p>
46 </div>
47 </c:when>
48 <%-- simple types layout--%>
49 <c:when test="${field.textField or field.password or field.textArea or field.dropdown or field.radioBox or field.checkBox}">
50 <div class="ef-field clearfix">
51 <label><c:out value="${field.label}"/><span class="ef-req"><c:out value="${field.requiredMarker}"/></span></label>${field.html}<span
52 class="ef-hint"><c:out value="${field.hint}"/></span>
53 </div>
54 </c:when>
55 <c:when test="${field.radioGroup}">
56 <div class="ef-field clearfix">
57 <label><c:out value="${field.label}"/><span class="ef-req"><c:out value="${field.requiredMarker}"/></span></label>
58 <c:forEach var="radio" items="${field.fields}">
59 <p>${radio.html}<span><c:out value="${radio.label}"/></span></p>
60 </c:forEach>
61 <c:if test="${field.allowOther}">
62 ${field.otherChoice} <fmt:message key="easyforms.formtemplate.other"/>: <span>${field.other}</span>
63 </c:if>
64 <span class="ef-hint"><c:out value="${field.hint}"/></span>
65 </div>
66 </c:when>
67 <c:when test="${field.checkBoxGroup}">
68 <div class="ef-field clearfix">
69 <label><c:out value="${field.label}"/><span class="ef-req">${field.requiredMarker}</span></label>
70 <c:forEach var="box" items="${field.fields}">
71 <p>${box.html} <c:out value="${box.label}"/></p>
72 </c:forEach>
73 <c:if test="${field.allowOther}">
74 ${field.otherChoice} <fmt:message key="easyforms.formtemplate.other"/>: <span>${field.other}</span>
75 </c:if>
76 <span class="ef-hint"><c:out value="${field.hint}"/></span>
77 </div>
78 </c:when>
79 <%-- LIKERT--%>
80 <c:when test="${field.likert}">
81 <div class="ef-field clearfix">
82 <label><c:out value="${field.label}"/><span class="ef-req"><c:out value="${field.requiredMarker}"/></span></label>
83 <table class="ef-likert-table">
84 <tr>
85 <td>&nbsp;</td>
86 <c:forEach var="option" items="${field.options}">
87 <td>${option}</td>
88 </c:forEach>
89 </tr>
90 <c:forEach var="map" items="${field.htmlMap}">
91 <tr>
92 <td><c:out value="${map.key.label}"/></td>
93 <c:forEach var="radio" items="${map.value}">
94 <td>${radio.html}</td>
95 </c:forEach>
96 </tr>
97 </c:forEach>
98 </table>
99 <span class="ef-hint"><c:out value="${field.hint}"/></span>
100 </div>
101 </c:when>
102 </c:choose>
103 </c:forEach>
104 <div class="ef-buttons">
105 <c:forEach var="button" items="${form.buttons}">
106 ${button.html}
107 </c:forEach>
108 </div>
109 </form>
110 </c:otherwise>
111 </c:choose>
112 <%--
113 HERE WE PRINT JAVASCRIPT CALL WHICH WILL VALIDATE OUR FORM
114 --%>
115 ${form.jsCall}
116 <%--
117 //########################################################################
118 // HEADER CONTRIBUTIONS
119 //########################################################################
120 --%>
121
122 <hst:headContribution keyHint="formValidationCss" category="css">
123 <link rel="stylesheet" href="<hst:link path="/js/formcheck/theme/blue/formcheck.css"/>" type="text/css"/>
124 </hst:headContribution>
125
126 <hst:headContribution keyHint="formJsValidation" category="jsInternal">
127 <script type="text/javascript" src="<hst:link path="/js/jquery.validate.min.js"/>"></script>
128 </hst:headContribution>
129 <%--
130 easy forms css
131 --%>
132 <hst:headContribution keyHint="formCss" category="css">
133 <link rel="stylesheet" href="<hst:link path="/css/easyforms.css"/>" type="text/css"/>
134 </hst:headContribution>

Properties

Name Value
svn:eol-style native
svn:keywords Id