Rev 1306 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="pt.estgp.estgweb.web.form.surveys.SurveysForm" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
<jsp:useBean id="SurveysForm" type="pt.estgp.estgweb.web.form.surveys.SurveysForm" scope="request"/>
<jomm:messages/>
<html:errors/>
<html:form action="/user/submitSurveyResponseFromHome">
<input type="hidden" name="dispatch">
<html:hidden name="SurveysForm" property="surveyView.id"/>
<html:hidden name="SurveysForm" property="surveyResponseView.id"/>
<input type="hidden" name="questionsListSize" value="<%=((SurveysForm)request.getAttribute("SurveysForm")).getSurveyView().getQuestions().size()%>">
<table class="form" border="0">
<tr>
<th><bean:message key="survey.answer.form.title"/></th>
<td>
<html:hidden name="SurveysForm" property="surveyView.title"/>
<bean:write name="SurveysForm" property="surveyView.title"/>
</td>
</tr>
<tr>
<th><bean:message key="survey.answer.form.type"/></th>
<td>
<html:hidden name="SurveysForm" property="surveyView.type"/>
<bean:message key="surveys.type.${SurveysForm.surveyView.type}"/>
</td>
</tr>
<tr>
<th><bean:message key="survey.answer.form.end.date"/></th>
<td>
<html:hidden name="SurveysForm" property="surveyView.formatedEndDate"/>
<bean:write name="SurveysForm" property="surveyView.formatedEndDate"/>
</td>
</tr>
<logic:notEqual name="SurveysForm" property="surveyView.type" value="general">
<tr>
<th><bean:message key="survey.answer.form.related"/></th>
<td>
<html:hidden name="SurveysForm" property="surveyResponseView.structuralNodeView.msg"/>
<bean:write name="SurveysForm" property="surveyResponseView.structuralNodeView.msg"/>
</td>
</tr>
</logic:notEqual>
<tr>
<th></th>
<td colspan="2">
<nested:iterate id="questionView" name="SurveysForm" property="surveyView.questions" indexId="qId">
<input type="hidden" name="itemsListSize${qId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getItems().size()%>"/>
<input type="hidden" name="candidatesLabelsSize${qId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getCandidatesLabels().size()%>"/>
<nested:hidden property="id"/>
<nested:hidden property="required"/>
<table id="questionTable">
<tr>
<td colspan="200" class="questionLabelCell">
<nested:hidden property="labelpt"/>
<nested:hidden property="type"/>
<nested:write property="labelpt"/>
<nested:equal property="required" value="true">
<div id="surveyRequiredQuestion"><bean:message key="survey.answer.form.required.question"/></div>
</nested:equal>
</td>
</tr>
<nested:equal property="type" value="text">
<tr>
<td>
<nested:iterate id="item" property="items" indexId="iId">
<input type="hidden" name="candidatesListSize${qId}${iId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getItems().get(iId).getCandidates().size()%>"/>
<nested:iterate property="candidates">
<nested:hidden property="id"/>
</nested:iterate>
<logic:iterate id="c" name="item" property="candidates">
<nested:textarea property="textareaValue" styleId="surveyTextarea"/>
</logic:iterate>
</nested:iterate>
</td>
</tr>
</nested:equal>
<nested:equal property="type" value="radio">
<nested:iterate id="item" property="items" indexId="iId">
<input type="hidden" name="candidatesListSize${qId}${iId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getItems().get(iId).getCandidates().size()%>"/>
<nested:iterate property="candidates">
<nested:hidden property="id"/>
<nested:hidden property="labelpt"/>
</nested:iterate>
<logic:iterate id="c" name="item" property="candidates">
<tr>
<td>
<nested:radio property="radioValue" value="${c.id}"/>
<nested:write name="c" property="labelpt"/>
</td>
</tr>
</logic:iterate>
</nested:iterate>
</nested:equal>
<nested:equal property="type" value="check">
<nested:iterate id="item" property="items" indexId="iId">
<input type="hidden" name="candidatesListSize${qId}${iId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getItems().get(iId).getCandidates().size()%>"/>
<nested:iterate property="candidates">
<tr>
<td>
<nested:hidden property="id"/>
<nested:hidden property="labelpt"/>
<nested:checkbox property="checkbox"/>
<nested:write property="labelpt"/>
</td>
</tr>
</nested:iterate>
</nested:iterate>
</nested:equal>
<nested:equal property="type" value="matrix">
<tr>
<td></td>
<nested:iterate property="candidatesLabels">
<td class="candidateCell">
<nested:hidden property="labelpt"/>
<nested:write property="labelpt"/>
</td>
</nested:iterate>
</tr>
<input type="hidden" name="teste_row_hidden"/>
<nested:iterate id="item" property="items" indexId="iId">
<input type="hidden" name="candidatesListSize${qId}${iId}" value="<%=SurveysForm.getSurveyView().getQuestions().get(qId).getItems().get(iId).getCandidates().size()%>"/>
<nested:iterate property="candidates">
<nested:hidden property="id"/>
<nested:hidden property="labelpt"/>
</nested:iterate>
<tr onmouseover="this.style.backgroundColor='#aFaFaF'" onmouseout="this.style.backgroundColor='#F7F7F7'">
<td>
<nested:hidden property="labelpt"/>
<nested:write property="labelpt"/>
</td>
<logic:iterate id="c" name="item" property="candidates">
<td class="candidateCell">
<nested:radio property="radioValue" value="${c.id}"/>
</td>
</logic:iterate>
</tr>
</nested:iterate>
</nested:equal>
</table>
</nested:iterate>
</td>
</tr>
</table>
<hr>
<input type="button" value="<bean:message key="confirm"/>"
onclick="set(this.form,'answer');this.form.submit();">
</html:form>
Generated by GNU Enscript 1.6.5.2.