<%
	def rcontext = _ctx.getRequestContext();
	def jsManager = rcontext.getJavascriptManager();	

	String quickSearchlink = uicomponent.event("QuickSearch");							 	
	def keyPressAct = "portalControl.UIPortalControl.onEnterPress(event, executeScript);event.cancelBubble = true";
	
	jsManager.require("SHARED/jquery", "\$").require("SHARED/portalControl", "portalControl")
				.addScripts("var executeScript = \$('#$uiform.id .quickSearch').attr('href');")
				.addScripts("\$('#$uiform.id .quickSet').on('keypress', function(event) {$keyPressAct});");
%>
<div class="uiSearch uiGrayLightBox">	
	<div class="uiSearchFor  form-search">
		<%uiform.begin()%>
		  <div class="quickSet ">
			<span class="searchTitle"><label for="searchTerm,searchOption"><%=_ctx.appRes("UISearch.label.Search")%>:</label></span >
			<% 
				QuickSearchInputSet = uiform.getQuickSearchInputSet();
				for(field in QuickSearchInputSet.getChildren()) {
                    def label = uiform.getLabel(field);
                    if(label != null && label != "") {%>
                        <label for="<%=field.getId()%>"><%=label%></label>
                    <%}
					uiform.renderField(field);
				}	 
			%>
			<a class="btn btn-primary quickSearch" href="javascript:void(0);" onclick="$quickSearchlink" title="<%= _ctx.appRes("UISearch.label.QuickSearch") %>"><%=_ctx.appRes("UISearch.label.Search")%></a>
		</div>	
		<%uiform.end()%>	 
	</div>		
</div>

