<div class="UIForm FormLayout FormScrollLayout"> 
	<% 
		uiform.begin() 
	%>
	
	<%/* start render action*/%>
  <% if (uiform.isShowActionsOnTop()) {
            uiform.processRenderAction()
         }
  %>
    <%/* end render action*/%>   
	
  <div class="HorizontalLayout">	  
   <table class="UIFormGrid">
      <tr>
        <td class="FieldLabel"><label for="title"><%=_ctx.appRes("Article.dialog.label.title")%></label></td>
        <td class="FieldComponent">
        <%
          String[] fieldTitle = ["jcrPath=/node/exo:title", "options=noSanitization", "validate=empty"] ;
          uicomponent.addTextField("title", fieldTitle) ;
        %>
        </td>
      </tr>  

			<tr>
			  <td class="FieldLabel"><label for="name"><%=_ctx.appRes("Article.dialog.label.name")%></label></td>
			  <td class="FieldComponent">
			  <%
	        String[] fieldName = ["jcrPath=/node", "options=noSanitization", "mixintype=mix:votable,mix:commentable,mix:i18n,mix:versionable", "editable=if-null", "validate=empty,name"] ;
	        uicomponent.addTextField("name", fieldName) ; 
      	%>	      
          <script type="text/javascript">
          titleField = document.getElementById("title");
          titleField.onchange = function() { eXo.ecm.SELocalization.cleanName(this.value, "name"); } ;
          </script>
        </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="location"><%=_ctx.appRes("Event.dialog.label.location")%></label></td>
        <td class="FieldComponent">
        <%
          String[] fieldLocation = ["jcrPath=/node/exo:location", "validate=empty"] ;
          uicomponent.addTextField("location", fieldLocation) ;
        %>
        </td>
      </tr>  

      <tr>                        
        <td class="FieldLabel"><label for="withMap">Google Maps ?</label></td>
        <td class="FieldComponent"> 
        <% 
          String[] fieldMaps = ["jcrPath=/node/exo:maps", "defaultValues=false"];         
          uicomponent.addCheckBoxField("withMap", fieldMaps);
        %>
        </td>
      </tr>
			
      <tr>                        
        <td class="FieldLabel"><label for="startEvent"><%=_ctx.appRes("Event.dialog.label.start-date-time")%></label></td>
        <td class="FieldComponent">
          <%
            String[] fieldStartEvent = ["jcrPath=/node/exo:startEvent", "validate=datetime", "visible=true"] ; 
            uicomponent.addCalendarField("startEvent", fieldStartEvent) ;
          %>
        </td>
      </tr>
			
      <tr>                        
        <td class="FieldLabel"><label for="endEvent"><%=_ctx.appRes("Event.dialog.label.end-date-time")%></label></td>
        <td class="FieldComponent">
          <%
            String[] fieldEndEvent = ["jcrPath=/node/exo:endEvent", "validate=datetime", "visible=true"] ; 
            uicomponent.addCalendarField("endEvent", fieldEndEvent) ;
          %>
        </td>
      </tr>

      <tr>
        <td class="FieldLabel"><label for="url">URL</label></td>
        <td class="FieldComponent">
        <%
          String[] fieldUrl = ["jcrPath=/node/exo:url"] ;
          uicomponent.addTextField("url", fieldUrl) ;
        %>
        </td>
      </tr>  
      
			
			<tr>
			  <td class="FieldLabel"><label for="summary"><%=_ctx.appRes("Article.dialog.label.summary")%></label></td>
			  <td class="FieldComponent">
			    <div class="UIFCKEditor">					
						<%
			        String[] fieldSummary = ["jcrPath=/node/exo:summary", "options=toolbar:SuperBasicWCM", ""] ;
			        uicomponent.addRichtextField("summary", fieldSummary) ;
		      	%>
		      </div>
				</td>
			</tr>  
			
			<tr>
			  <td class="FieldLabel"><label for="content"><%=_ctx.appRes("Article.dialog.label.content")%></label></td>
			  <td class="FieldComponent">
			    <div class="UIFCKEditor">
						<%
			        String[] fieldContent = ["jcrPath=/node/exo:text", "options=toolbar:BasicWCM", ""] ;
			        uicomponent.addRichtextField("content", fieldContent) ;        
			      %>
					</div>
				</td>
			</tr>
		</table>
  </div>
  <% if (!uiform.isShowActionsOnTop()) {
            uiform.processRenderAction()
         }
  %>
  <%uiform.end()%>
</div>