<div class="UIFormWithTitle">
  <div class="TitleBar"><%=_ctx.appRes(uicomponent.getId() + ".title")%></div>
	<% uiform.begin() %>
  <div class="HorizontalLayout">	  
		<table class="UIFormGrid">	
			<tr>	          					
			  <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.id")%></td>
			  <td class="FieldComponent">
				  <%
					 String[] fieldId = ["jcrPath=/node", "mixintype=mix:affectedNodeTypes", "editable=false", "visible=if-not-null"] ;
					 uicomponent.addMixinField("id", fieldId) ;  
				  %>
				</td>
			</tr>
			<tr>
			  <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.name")%></td>
			  <td class="FieldComponent">
				  <% 
					String[] fieldName = ["jcrPath=/node/exo:name", "validate=empty"];
					uicomponent.addTextField("actionName", fieldName);
				  %>
				</td>
			</tr>		          					
			<tr>
			  <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.lifecycle")%></td>
			  <td class="FieldComponent">
			  <% 
          String[] fieldLifecycle = ["jcrPath=/node/exo:lifecyclePhase", 
                                     "options=read,schedule,node_added,node_removed,property_added,property_removed,property_changed",
                                     "multiValues=true", "onchange=true","size=5","validate=empty"] ;
          uicomponent.addSelectBoxField("lifecycle", fieldLifecycle) ;
        %>
				</td>
			</tr>	
			<tr>		          					
			  <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.metadata")%></td>
			  <td class="FieldComponent">
				  <% 
					String[] fieldMetadata = ["jcrPath=/node/exo:mixinMetadata", "script=ecm-explorer/widget/FillSelectBoxWithMetadatas.groovy", "scriptParams=repository"] ;         
					uicomponent.addSelectBoxField("metadata", fieldMetadata) ;
				  %>
				</td>
			</tr>
			<tr>                        
        <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.isDeep")%></td>
        <td class="FieldComponent"> 
        <% 
          String[] fieldDeep = ["jcrPath=/node/exo:isDeep", "defaultValues=true"];         
          uicomponent.addCheckBoxField("isDeep", fieldDeep);
        %>
        </td>
      </tr>
      <tr>                        
        <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.nodetypes")%></td>
        <td class="FieldComponent"> 
        <% 
          String[] fieldnodetypes = ["jcrPath=/node/exo:nodeTypeName", "selectorAction=selectNodeTypes", "multiValues=true", "selectorClass=org.exoplatform.ecm.webui.nodetype.selector.UINodeTypeSelector", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"];         
          uicomponent.addActionField("nodetypes", fieldnodetypes);
        %>
        </td>
      </tr>
			<tr>		          					
			  <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.description")%></td>
			  <td class="FieldComponent">
				  <% 
					String[] fieldDescription = ["jcrPath=/node/exo:description"] ;         
					uicomponent.addTextAreaField("description", fieldDescription) ;
				  %>
				</td>
			</tr>
			<tr>                       
        <td class="FieldLabel"><%=_ctx.appRes("AddMetadata.dialog.label.affectedNodeTypeNames")%></td>
        <td class="FieldComponent">
        <% 
          String[] fieldAffectedNodetypes = ["jcrPath=/node/exo:affectedNodeTypeNames", "selectorAction=selectAffectedNodeTypes", "multiValues=true", "selectorClass=org.exoplatform.ecm.webui.nodetype.selector.UINodeTypeSelector", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"];
        uicomponent.addActionField("affectedNodetypes", fieldAffectedNodetypes);
        %>
      </tr>
 		</table>
		<%/* start render action*/%>
		<%uiform.processRenderAction()%>
		<%/* end render action*/%>
  </div>
  <%uiform.end()%>
</div>