<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" version="2.0">
	<jsp:directive.page language="java"
		contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
	<jsp:text>
		<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
	</jsp:text>
	<jsp:text>
		<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
	</jsp:text>
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<jsp:include page='../includes/header.jsp'>
		<jsp:param name="title" value="add review page" />
	</jsp:include>
	</head>
	<body>	
	<f:view>
		<jsp:include page='../includes/header_body.jsp' />
		<jsp:include page='../includes/topMenu.jsp' />
		<jsp:include page='../includes/leftMenu.jsp' />	
		<div id="CONTENT" >		
		<h:form id="rev">										
				
			<h:panelGrid border="0" columns="1" >
				<f:facet name="header">
					<h:outputText value="#{resources['addReviewPage.form.label']} #{visitBean.currentPaper.title}" ></h:outputText>					
				</f:facet>
				<h:messages globalOnly="true"></h:messages>				
				<h:dataTable border="1" value="#{addReviewBean.questions}"
					 var="question" binding="#{addReviewBean.questionsTable}">					 					 
					<h:column >		
						<h:outputText value="#{question.question}"></h:outputText>				
						<h:selectManyCheckbox value="#{addReviewBean.selectedAnswersArray[addReviewBean.questionsTable.rowIndex]}" layout="pageDirection" >
							<f:selectItems value="#{addReviewBean.answersArray[addReviewBean.questionsTable.rowIndex]}"/>
						</h:selectManyCheckbox>																
					</h:column>
				</h:dataTable>
				
				<h:outputLabel value="#{resources['addReviewPage.field.label.grade']}" for="grade" />
				<h:selectOneListbox id="grade" value="#{visitBean.currentReview.grade}" required="true" size="1" >
					<f:selectItems value="#{addReviewBean.grades}"/>
				</h:selectOneListbox>	
				<h:message for="grade"></h:message>
				
				<h:outputLabel value="#{resources['addReviewPage.field.label.commentForAuthor']}" for="cToAuthor"/>
				<h:inputTextarea  id="cToAuthor" required="true" value="#{visitBean.currentReview.commentsToAuthor}" />				
				<h:message for="cToAuthor"></h:message>
				
				<h:outputLabel value="#{resources['addReviewPage.field.label.commentForOrganizator']}" for="cToOrg"/>
				<h:inputTextarea id="cToOrg" required="true" value="#{visitBean.currentReview.commentsToOrganisator}" />				
				<h:message  for="cToOrg"></h:message>								
				
				<h:panelGroup />
					<h:commandButton value="#{resources['addReviewPage.button.label']}" action="#{addReviewBean.addReview}" />					
				<h:panelGroup />			
			</h:panelGrid>
		</h:form>	
		</div>
		<jsp:include page='../includes/footer.jsp' />
	</f:view>
	</body>
	</html>
</jsp:root>