<div class="UIFormWithTitle">
  <div class="TitleBar"><%=_ctx.appRes(uicomponent.getId() + ".title")%></div>
	<% uiform.begin() %>
  <div class="HorizontalLayout">
  	<table class="UIFormGrid">	  
  		<tr>
	      <td class="FieldLabel"><label for="id"><%=_ctx.appRes("ContentPublishing.dialog.label.id")%></label></td>
	      <td class="FieldComponent">
		      <%
		        String[] fieldId = ["jcrPath=/node", "mixintype=mix:affectedNodeTypes,exo:publishLocation,exo:pendingLocation,exo:backupLocation,exo:trashLocation", "editable=false", "visible=if-not-null"] ;
		        uicomponent.addMixinField("id", fieldId) ;  
		      %>
		    </td>
		  </tr>
		  <tr>
	      <td class="FieldLabel"><label for="name"><%=_ctx.appRes("ContentPublishing.dialog.label.name")%></label></td>
	      <td class="FieldComponent">
		      <% 
		        String[] fieldName = ["jcrPath=/node/exo:name", "validate=name"] ;
		        uicomponent.addTextField("name", fieldName)  ;
		      %>
		    </td>
		  </tr>
		  <tr>
	      <td class="FieldLabel"><label for="lifecycle"><%=_ctx.appRes("ContentPublishing.dialog.label.lifecycle")%></label></td>
	      <td class="FieldComponent">
					  <% 
							String[] fieldLifecycle = ["jcrPath=/node/exo:lifecyclePhase", 
							                           "options=read,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"><label for="description"><%=_ctx.appRes("ContentPublishing.dialog.label.description")%></label></td>
	      <td class="FieldComponent">
		      <% 
		        String[] fieldDescription = ["jcrPath=/node/exo:description"] ; 
		        uicomponent.addTextAreaField("description", fieldDescription) 
		      %>
		    </td>
		  </tr>
		<tr>
      <td class="FieldLabel"><label for="supervisor"><%=_ctx.appRes("ContentPublishing.dialog.label.supervisor")%></label></td>
      <td class="FieldComponent">
        <% 
        String[] fieldSupervisor = ["jcrPath=/node/exo:supervisor", "selectorAction=selectPermission", "selectorClass=org.exoplatform.ecm.webui.selector.UIPermissionSelector", "selectorIcon=Permission24x24Icon", "validate=empty", "editable=false"] ;
          uicomponent.addActionField("supervisor", fieldSupervisor)  ;
        %>
      </td>
    </tr>	  		  
		  <tr>
	      <td class="FieldLabel"><label for="publishWorkspace"><%=_ctx.appRes("ContentPublishing.dialog.label.public-workspace")%></label></td>
	      <td class="FieldComponent">
		      <% 
		        String[] fieldPublicWorkspace = ["jcrPath=/node/exo:publishWorkspace", "script=ecm-explorer/widget/FillSelectBoxWithWorkspaces.groovy", "scriptParams=repository", "onchange=true"] ;
		        uicomponent.addSelectBoxField("publishWorkspace", fieldPublicWorkspace) ;
		      %>
		    </td>
		  </tr>
		  <tr>
	      <td class="FieldLabel"><label for="publicPath"><%=_ctx.appRes("ContentPublishing.dialog.label.public-path")%></label></td>
	      <td class="FieldComponent">
		      <% 
		        String[] fieldPublicPath = ["jcrPath=/node/exo:publishPath", "selectorAction=selectPublicLocationPath", "selectorClass=org.exoplatform.ecm.webui.tree.selectone.UIOneNodePathSelector", "workspaceField=publishWorkspace", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"] ;
		        uicomponent.addActionField("publicPath", fieldPublicPath)  ;
		      %>
		    </td>
		  </tr>
		  <tr>
      <td class="FieldLabel"><label for="validator"><%=_ctx.appRes("ContentPublishing.dialog.label.validator")%></label></td>
      <td class="FieldComponent">
        <% 
          String[] fieldValidator = ["jcrPath=/node/exo:validator", "selectorAction=selectPermission", "selectorClass=org.exoplatform.ecm.webui.selector.UIPermissionSelector", "selectorIcon=Permission24x24Icon", "validate=empty", "editable=false"] ;
          uicomponent.addActionField("validator", fieldValidator) ;
        %>
      </td>
    </tr>
     <tr>
        <td class="FieldLabel"><label for="pendingWorkspace"><%=_ctx.appRes("ContentPublishing.dialog.label.pending-workspace")%></label></td>
        <td class="FieldComponent">
          <% 
            String[] fieldPendingWorkspace = ["jcrPath=/node/exo:pendingWorkspace", "script=ecm-explorer/widget/FillSelectBoxWithWorkspaces.groovy", "scriptParams=repository", "onchange=true"] ;
            uicomponent.addSelectBoxField("pendingWorkspace", fieldPendingWorkspace) ;
          %>
        </td>
      </tr>
      <tr>
        <td class="FieldLabel"><label for="pendingPath"><%=_ctx.appRes("ContentPublishing.dialog.label.pending-path")%></label></td>
        <td class="FieldComponent">
          <% 
            String[] fieldPendingPath = ["jcrPath=/node/exo:pendingPath", "selectorAction=selectPendingLocationPath", "selectorClass=org.exoplatform.ecm.webui.tree.selectone.UIOneNodePathSelector", "workspaceField=pendingWorkspace", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"] ;
            uicomponent.addActionField("pendingPath", fieldPendingPath)  ;
          %>
        </td>
      </tr>
     <tr>
      <td class="FieldLabel"><label for="backupWorkspace"><%=_ctx.appRes("ContentPublishing.dialog.label.backup-workspace")%></label></td>
      <td class="FieldComponent">
        <% 
          String[] fieldBackupWorkspace = ["jcrPath=/node/exo:backupWorkspace", "script=ecm-explorer/widget/FillSelectBoxWithWorkspaces.groovy", "scriptParams=repository", "onchange=true"] ;
          uicomponent.addSelectBoxField("backupWorkspace", fieldBackupWorkspace) ;
        %>
      </td>
    </tr>
    <tr>
      <td class="FieldLabel"><label for="backupPath"><%=_ctx.appRes("ContentPublishing.dialog.label.backup-path")%></label></td>
      <td class="FieldComponent">
        <% 
          String[] fieldBackupPath = ["jcrPath=/node/exo:backupPath", "selectorAction=selectBackupLocationPath", "selectorClass=org.exoplatform.ecm.webui.tree.selectone.UIOneNodePathSelector", "workspaceField=backupWorkspace", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"] ;
          uicomponent.addActionField("backupPath", fieldBackupPath)  ;
        %>
      </td>
    </tr>
       <tr>
        <td class="FieldLabel"><label for="trashWorkspace"><%=_ctx.appRes("ContentPublishing.dialog.label.trash-workspace")%></label></td>
        <td class="FieldComponent">
          <% 
            String[] fieldTrashWorkspace = ["jcrPath=/node/exo:trashWorkspace", "script=ecm-explorer/widget/FillSelectBoxWithWorkspaces.groovy", "scriptParams=repository", "onchange=true"] ;
            uicomponent.addSelectBoxField("trashWorkspace", fieldTrashWorkspace);
          %>
        </td>
      </tr>
      <tr>
        <td class="FieldLabel"><label for="trashPath"><%=_ctx.appRes("ContentPublishing.dialog.label.trash-path")%></label></td>
        <td class="FieldComponent">
          <% 
            String[] fieldTrashPath = ["jcrPath=/node/exo:trashPath", "selectorAction=selectBackupLocationPath", "selectorClass=org.exoplatform.ecm.webui.tree.selectone.UIOneNodePathSelector", "workspaceField=trashWorkspace", "selectorIcon=SelectPath24x24Icon", "validate=empty", "editable=false"] ;
            uicomponent.addActionField("trashPath", fieldTrashPath)  ;
          %>
        </td>
      </tr>
      <tr>                       
  			   <td class="FieldLabel"><label for="affectedNodetypes"><%=_ctx.appRes("ContentPublishing.dialog.label.affectedNodeTypeNames")%></label></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*/%>
		<div class="UIAction"> 
	      <% for(action in uicomponent.getActions()) { 
	      		 String actionLabel = _ctx.appRes(uicomponent.getName() + ".action." + action) 
						 String link = uicomponent.event(action) ;
	      %>
          <a href="$link" class="ActionButton LightBlueStyle">
			    $actionLabel
			</a>
	      <%}%>    
	  </div>
	  <%/* end render action*/%>
  </div>
  <%uiform.end()%>
</div>
