<%
  def rcontext = _ctx.getRequestContext(); 
  String inputId = uiform.TEMPLATE_SEARCHBOX;
  def requireJs = rcontext.getJavascriptManager().getRequireJS();
  String mode = uiform.getMode();
  requireJs.require("SHARED/UIWikiTemplateForm", "UIWikiTemplateForm");
  requireJs.addScripts("UIWikiTemplateForm.init('" + uicomponent.id + "', '" + inputId + "', '" + mode + "', '" +  _ctx.appRes("UITemplateSettingForm.label.Search")  + "');");
  def selectLabel = _ctx.appRes("UIWikiSelectTemplateForm.action.title." + uicomponent.ACTION_ADD);
  def cancelLabel = _ctx.appRes("UIWikiSelectTemplateForm.action.title." + uicomponent.ACTION_CANCEL);
%>

<div class="uiWikiTemplateForm">
  <%uiform.begin();%>
  	<div class="resizable">
        <div class="templateControl clearfix">
            <div class="uiSearchInput pull-left" >
                <% uiform.renderChild(uiform.TEMPLATE_SEARCHBOX);	%>
                <a onclick="<%=uiform.event(uiform.ACTION_SEARCH);%>"  data-placement="bottom" rel="tooltip" class="advancedSearch" data-original-title="<%=_ctx.appRes("UITemplateSettingForm.label.Search")%>"><i class="uiIconSearch "></i></a>
            </div>
        </div>
		
	    <% uiform.renderChild(uiform.TEMPLATE_GRID);	%>
	  </div>
	  
    <div class="uiAction uiActionBorder">
      <a class="btn selectTemplateAction" href="javascript:void(0);"><%=selectLabel%></a>
      <a class="btn" href="javascript:void(0);" onclick="<%= uicomponent.event(uicomponent.ACTION_CANCEL) %>"><%=cancelLabel%></a>
    </div>			
  <%uiform.end();%>
</div>
