<%
	uicomponent.addInterceptor("ecm-explorer/interceptor/PostFilePlanInterceptor.groovy", "post") ;
  def rcontext = _ctx.getRequestContext() ;
%>

<%/*Begin UITabPane*/%>
<div class="UITabPane">	
  <%/*Begin TabPaneContent*/%>
  <div class="TabPaneContent" style="padding:0px"> 
    <%/*Begin WorkingArea*/%>
    <div class="WorkingAreaWithHelp">		
	
	<%uiform.begin()%>
	<%/* start render action*/%>
  <% if (uiform.isShowActionsOnTop()) {
            uiform.processRenderAction()
         }
  %>
	<%/* end render action*/%>
    
	<%/*Begin Tabs*/%>
      <div class="UIHorizontalTabs" style="margin-top:5px;">
        <div class="LeftHorizontalTabs">
	     	  <div class="RightHorizontalTabs">
	     	    <div class="CenterHorizontalTabs">
			        <div class="TabsContainer">

			            <div class="UITab NormalTabStyle">
			              <div class="SelectedTab">
			                <div class="LeftTab">
			                  <div class="RightTab">                
			                    <div class="MiddleTab" onClick="eXo.webui.UIHorizontalTabs.displayTabContent(this);"><%=_ctx.appRes("FilePlan.dialog.label.name")%></div>
			                  </div>
			                </div>
			              </div>
			            </div>  
			            
			            <div class="UITab NormalTabStyle">
			              <div class="NormalTab">
			                <div class="LeftTab">
			                  <div class="RightTab">                
			                    <div class="MiddleTab" onClick="eXo.webui.UIHorizontalTabs.displayTabContent(this);"><%=_ctx.appRes("FilePlan.dialog.label.record-properties")%></div>
			                  </div>
			                </div>
			              </div>
			            </div>                
									
									 <div class="UITab NormalTabStyle">
			              <div class="NormalTab">
			                <div class="LeftTab">
			                  <div class="RightTab">                
			                    <div class="MiddleTab" onClick="eXo.webui.UIHorizontalTabs.displayTabContent(this);"><%=_ctx.appRes("FilePlan.dialog.label.process-properties")%></div>
			                  </div>
			                </div>
			              </div>
			            </div>  
			            
			        </div>
			      </div>
			    </div>
			  </div>
      </div>
      <%/*End UIHorizontalTabs*/%>
      <%/*Start UITabContentContainer*/%>   
							
				<div class="HorizontalLayout" style="overflow:auto;">	  
      
		      <div class="UITabContentContainer">
		      	<div class="UITabContent" style="display: block;">
						    <table class="UIFormGrid">
									<tr>
									  <td class="FieldLabel"><label for="name"><%=_ctx.appRes("FilePlan.dialog.label.name")%></label></td>
									  <td class="FieldComponent">
							      <%
							        String[] fieldName = ["jcrPath=/node", "editable=if-null", "mixintype=mix:i18n", "validate=empty,name"] ;
							        uicomponent.addTextField("name", fieldName) ; 
							      %>									  							      
									  </td>
									</tr>
									<%if(!uicomponent.getId().equals("UILanguageDialogForm")){%>
									<tr>
							      <td class="FieldLabel"><label for="categories"><%=_ctx.appRes("FilePlan.dialog.label.categories")%></label></td>
							      <td class="FieldComponent">
								      <% 
								        String[] fieldCategories = ["jcrPath=/node/exo:category", "multiValues=true", "reference=true", "editable=false"];
								        uicomponent.addTextField("categories", fieldCategories);
								      %>
								    </td>
								  </tr>
								  <%}%>		
									<tr>
        								<td class="FieldLabel"><label for="content-lang"><%=_ctx.appRes("ElementSet.dialog.label.language")%></label></td>
										<td class="FieldComponent">
										<%
										  String lang = org.exoplatform.portal.webui.util.Util.getPortalRequestContext().getLocale().toString();
										  String[] fieldLang = ["jcrPath=/node/exo:language", "script=ecm-explorer/widget/FillSelectBoxWithLanguage.groovy", lang] ;
										  uicomponent.addSelectBoxField("content-lang", fieldLang) ;
										%>
										</td>
									</tr>							
									<tr>
									  <td class="FieldLabel"><label for="filePlanNote"><%=_ctx.appRes("FilePlan.dialog.label.note")%></label></td>
									  <td class="FieldComponent">							      							  							      
										<%
							        String[] fieldPlanNode = ["jcrPath=/node/rma:filePlanNote"] ;
							        uicomponent.addTextAreaField("filePlanNote", fieldPlanNode) ; 
							      %>
									  </td>
									</tr>
								</table>
		      	</div> 
		      	
		      	<div class="UITabContent" style="display: none;">
		      		  <table class="UIFormGrid">
									<tr>
									  <td class="FieldLabel"><label for="recordCategoryIdentifier"><%=_ctx.appRes("FilePlan.dialog.label.record-category-identifier")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldCateIdentifier = ["jcrPath=/node/rma:recordCategoryIdentifier", "validate=empty"] ;
							        uicomponent.addTextField("recordCategoryIdentifier", fieldCateIdentifier) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="dispositionAuthority"><%=_ctx.appRes("FilePlan.dialog.label.disposition-author")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldDispotionAuthor = ["jcrPath=/node/rma:dispositionAuthority", "validate=empty"] ;
							        uicomponent.addTextField("dispositionAuthority", fieldDispotionAuthor) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="permanentRecordIndicator"><%=_ctx.appRes("FilePlan.dialog.label.permanent-record-indicator")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldPermanentRecord = ["jcrPath=/node/rma:permanentRecordIndicator", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("permanentRecordIndicator", fieldPermanentRecord) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="dispositionInstructions"><%=_ctx.appRes("FilePlan.dialog.label.disposition-instruction")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldDispositionInstruction = ["jcrPath=/node/rma:dispositionInstructions"] ;
							        uicomponent.addTextAreaField("dispositionInstructions", fieldDispositionInstruction) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="containsRecordFolders"><%=_ctx.appRes("FilePlan.dialog.label.contain-record-folder")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldContainsRecord = ["jcrPath=/node/rma:containsRecordFolders", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("containsRecordFolders", fieldContainsRecord) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="defaultMediaType"><%=_ctx.appRes("FilePlan.dialog.label.default-media-type")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldDefaultMedia = ["jcrPath=/node/rma:defaultMediaType", "options=Electronic,Paper", "validate=empty"] ;
							        uicomponent.addSelectBoxField("defaultMediaType", fieldDefaultMedia) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="defaultMarkingList"><%=_ctx.appRes("FilePlan.dialog.label.default-marking-list")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldDefaultMarking = ["jcrPath=/node/rma:defaultMarkingList", "options=NONE,CLASSIFIED,UNCLASSIFIED,NOCONTRACT", "validate=empty"] ;
							        uicomponent.addSelectBoxField("defaultMarkingList", fieldDefaultMarking) ; 
							      %>										
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="defaultOriginatingOrganization"><%=_ctx.appRes("FilePlan.dialog.label.default-originating-organization")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldDefaultOriginating = ["jcrPath=/node/rma:defaultOriginatingOrganization", "validate=empty"] ;
							        uicomponent.addTextField("defaultOriginatingOrganization", fieldDefaultOriginating) ; 
							      %>										
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="vitalRecordIndicator"><%=_ctx.appRes("FilePlan.dialog.label.vital-record-indicator")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldVitalRecord = ["jcrPath=/node/rma:vitalRecordIndicator", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("vitalRecordIndicator", fieldVitalRecord) ; 
							      %>										
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="vitalRecordReviewPeriod"><%=_ctx.appRes("FilePlan.dialog.label.vital-record-review-period")%></label></td>
									  <td class="FieldComponent">
										<%
							        String[] fieldVitalRecordReview = ["jcrPath=/node/rma:vitalRecordReviewPeriod", "options=one minute,hourly,daily,quarterly,yearly,ten years"] ;
							        uicomponent.addSelectBoxField("vitalRecordReviewPeriod", fieldVitalRecordReview) ; 
							      %>										
									  </td>
									</tr>
								</table>
		      	</div> 
		      	
		        <div class="UITabContent" style="display: none;">
		        	<table class="UIFormGrid">
									<tr>
									  <td class="FieldLabel"><label for="processCutoff"><%=_ctx.appRes("FilePlan.dialog.label.process-cutoff")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldProcessCutoff = ["jcrPath=/node/rma:processCutoff", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("processCutoff", fieldProcessCutoff) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="eventTrigger"><%=_ctx.appRes("FilePlan.dialog.label.event-trigger")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldEventTrigger = ["jcrPath=/node/rma:eventTrigger", "validate=empty"] ;
							        uicomponent.addTextField("eventTrigger", fieldEventTrigger) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="cutoffPeriod"><%=_ctx.appRes("FilePlan.dialog.label.cutoff-period")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldCutoffPeriod = ["jcrPath=/node/rma:cutoffPeriod", "options=one minute,hourly,daily,quarterly,yearly,ten years"] ;
							        uicomponent.addSelectBoxField("cutoffPeriod", fieldCutoffPeriod) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="cutoffOnObsolete"><%=_ctx.appRes("FilePlan.dialog.label.cutoff-on-obsolete")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldCutoffObsolete = ["jcrPath=/node/rma:cutoffOnObsolete", "options=true,false"] ;
							        uicomponent.addSelectBoxField("cutoffOnObsolete", fieldCutoffObsolete) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="cutoffOnSuperseded"><%=_ctx.appRes("FilePlan.dialog.label.cutoff-on-superseded")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldCutoffSupereseded = ["jcrPath=/node/rma:cutoffOnSuperseded", "options=true,false"] ;
							        uicomponent.addSelectBoxField("cutoffOnSuperseded", fieldCutoffSupereseded) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="processHold"><%=_ctx.appRes("FilePlan.dialog.label.process-hold")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldProcessHold = ["jcrPath=/node/rma:processHold", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("processHold", fieldProcessHold) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="holdPeriod"><%=_ctx.appRes("FilePlan.dialog.label.hold-period")%></label></td>
									  <td class="FieldComponent">							     							  							      
										<%
							        String[] fieldHoldPeriod = ["jcrPath=/node/rma:holdPeriod", "options=one minute,hourly,daily,quarterly,yearly,ten years"] ;
							        uicomponent.addSelectBoxField("holdPeriod", fieldHoldPeriod) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="discretionaryHold"><%=_ctx.appRes("FilePlan.dialog.label.discretionary-hold")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldDiscretionaryHold = ["jcrPath=/node/rma:discretionaryHold", "options=true,false"] ;
							        uicomponent.addSelectBoxField("discretionaryHold", fieldDiscretionaryHold) ; 
							      %>
									  </td>
									</tr>
									<tr>
									  <td class="FieldLabel"><label for="processTransfer"><%=_ctx.appRes("FilePlan.dialog.label.process-transfer")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldProcessTransfer = ["jcrPath=/node/rma:processTransfer", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("processTransfer", fieldProcessTransfer) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="defaultTransferLocation"><%=_ctx.appRes("FilePlan.dialog.label.default-transfer-location")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldDefaultTransfer = ["jcrPath=/node/rma:defaultTransferLocation"] ;
							        uicomponent.addTextField("defaultTransferLocation", fieldDefaultTransfer) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="transferBlockSize"><%=_ctx.appRes("FilePlan.dialog.label.transfer-block-size")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldTransferBlock = ["jcrPath=/node/rma:transferBlockSize","validate=number"] ;
							        uicomponent.addTextField("transferBlockSize", fieldTransferBlock) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="processAccession"><%=_ctx.appRes("FilePlan.dialog.label.process-accession")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldProcessAccession = ["jcrPath=/node/rma:processAccession", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("processAccession", fieldProcessAccession) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="accessionLocation"><%=_ctx.appRes("FilePlan.dialog.label.accession-location")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldAccessionLocation = ["jcrPath=/node/rma:accessionLocation"] ;
							        uicomponent.addTextField("accessionLocation", fieldAccessionLocation) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="accessionBlockSize"><%=_ctx.appRes("FilePlan.dialog.label.accession-block-size")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldAccessionBlockSize = ["jcrPath=/node/rma:accessionBlockSize","validate=number"] ;
							        uicomponent.addTextField("accessionBlockSize", fieldAccessionBlockSize) ; 
							      %>
									  </td>
									</tr>	
									<tr>
									  <td class="FieldLabel"><label for="processDestruction"><%=_ctx.appRes("FilePlan.dialog.label.process-destruction")%></label></td>
									  <td class="FieldComponent">							     							  							      										
										<%
							        String[] fieldProcessDestruction = ["jcrPath=/node/rma:processDestruction", "options=true,false", "validate=empty"] ;
							        uicomponent.addSelectBoxField("processDestruction", fieldProcessDestruction) ; 
							      %>
									  </td>
									</tr>										
							</table>							
		      	</div> 	
		      		        
		      </div>
		      <% if (!uiform.isShowActionsOnTop()) {
                    uiform.processRenderAction()
                 }
	        %>
      	</div>        						 
      <%/*End UITabContentContainer*/%>
      <%uiform.end()%>
    </div>  
    <%/*End WorkingArea*/%>
  </div>  
  <%/*End TabPaneContent*/%>
</div>  
<%/*End UITabPane*/%>
