<% 
	import org.exoplatform.web.application.JavascriptManager;
	def rcontext = _ctx.getRequestContext() ;
	JavascriptManager jsmanager = rcontext.getJavascriptManager();
	jsmanager.addJavascript("eXo.faq.UIAnswersPortlet.submitSearch('"+uiform.id+"');") ;
%>
<div class="UIAdvancedSearchForm $uicomponent.id">
	<% uiform.begin() %>
		<div class="HorizontalLayout">
			<div class="UIFormInput">
				<table class="UIFormGrid">
					<tbody>						
				<% 
					for(field in uiform.getChildren()) {
						if(field.isRendered()) {
				%>
							<tr>
								<%fieldName = uicomponent.getLabel(field.getName());%>
								<%if(!fieldName.equals(uicomponent.getId()) && fieldName != null && fieldName.length() > 0) { %>												
									<td class="FieldLabel">
											<label for="<%=field.getId()%>"><%=fieldName%></label>
									</td>
									<td class="FieldComponent">
											<% uiform.renderField(field) %>
									</td>
								<%} else {%>
									<td class="FieldComponent" colspan="2"><% uiform.renderField(field) %></td>
								<%}%>
							</tr>
				<%
						}
					}
				%>						
					</tbody>
				</table>
			</div>
		</div>
		<div class="UIAction">
      <% for(action in uicomponent.getActions()) { 
					 String actionLabel = _ctx.appRes(uicomponent.getName() + ".action." + action); 
					 String link = uicomponent.event(action) ;
					 String classN = (action.equals("Search")) ? "ActionSearch" : "";
				%>
      <a href="$link" class="$classN ActionButton LightBlueStyle">$actionLabel</a>
      <%}%>
    </div>
	<%uiform.end()%>
</div>
