<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>


<style type="text/css">

	.act input.active {
	}
	
	.act .active {
		color:#2277DD;
	}
	
	.shorttext {
		clear:both;
		border:1px solid #FFFFFF;
		margin:0.4em 1em;
	}
    
    .image_warning {
    	font-style: italic;
    }
    
    hr.hr2 {
		height:1px;
	}
	
	.fontbold {
		font-weight: bold;
	}
	
	.toolBarLink
	{
		font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;
		font-size:0.9em;
		margin-right:2px;
	}
    

</style>   

<%-- This file generated by Sakai App Builder --%>
<f:loadBundle basename="messages" var="msgs"/>

<f:view>
	<sakai:view title="WebLab Tool">

		<style>			
			.navIntraTool a, .navIntraTool a:link
			{
				margin-right:0px;
			}	
		</style>

		<h:form id="webLabsList">
			<sakai:tool_bar>
				<sakai:tool_bar_item action="#{ExperimentBean.processActionList}" value="#{msgs.new_weblab_list_link}" />
			</sakai:tool_bar>
		</h:form>

		<sakai:view_content>
			<h:form>
				<h:commandLink id="CL1" styleClass="toolBarLink" action="#{ExperimentBean.processActionList}" value="#{msgs.breadcrumbs_start_text}" />
				<h:graphicImage id="GI1" value="/images/arrow.gif" styleClass="toolBarLink" />
				<h:outputText id="OT1" value="#{msgs.new_weblab_title}" styleClass="toolBarLink" />
			</h:form>		
			<sakai:view_title value="#{msgs.new_weblab_title}"/>
			<hr width="100%" class="hr2" >
		
			<sakai:messages />
			<h:outputText id="OT2" value="#{msgs.required_fields}"/>
			<br><br>
					       		
	       	<h:form id="newEditWebLab" enctype="multipart/form-data">
	       			
	       		<h:panelGrid columns="2" columnClasses="shorttext">
					<h:outputLabel id="OL1" for="name" value="#{msgs.new_weblab_name_label} *" styleClass="fontbold"/>						  
					<h:inputText id="name" size="40" value="#{ExperimentBean.experimentName}" required="true">
		 				<f:validateLength minimum="2" maximum="255" />
					</h:inputText>
						
					<h:outputLabel id="OL2" for="description" value="#{msgs.new_weblab_description_label}" styleClass="fontbold"/>
	                <h:inputTextarea id="description" cols="50" rows="5" value="#{ExperimentBean.experimentDescription}" required="false" />
						
					<h:outputLabel id="OL3" for="image" value="#{msgs.new_weblab_image_label}" styleClass="fontbold"/>
					<t:inputFileUpload id="image" value="#{ExperimentBean.experimentImage}" storage="file" accept="image/*" required="false"/>
						 
					<h:outputText id="OT2" value=""/>
					<h:outputText value="#{msgs.new_weblab_image_warning}" styleClass="image_warning" />
				</h:panelGrid>       			
	       			
	       		<p class="act">
					<h:commandButton id="submit" action="#{ExperimentBean.processActionAdd}" value="#{msgs.new_weblab_save_button_text}" styleClass="active" />
					<h:commandButton id="CB1" style="act" type="reset" value="#{msgs.new_weblab_reset_button_text}"/>				
				</p>
	                                        	
	       	</h:form>
			 
  		</sakai:view_content>	
	</sakai:view>
</f:view> 
