<% 
	uiform.initSettingForm();
%>
<div class="uiFAQSettingForm">
	<% uiform.begin() %>
	<div class="uiTabPane">				
		<div class="workingArea">
			<div class="actionButtonGroup center">			 		
				<div class="btn-group ">
					<%String classCss = "active" ; 
					int i_ = 0;
					for(tabconten in uiform.getChildren()){ 
						String link = "javascript:void(0);";
						if(uiform.getIsSelected(i_)) classCss = "active" ;
						else {
							classCss = "" ;
							link = uicomponent.event("SelectTab",""+i_) ;
						}
					%>	
					<button type="button" class="btn $classCss" onclick="$link">
						<%= _ctx.appRes(uiform.id + ".label." + tabconten.id); %>
					</button>
				<%	 ++i_;
					} %>
				</div>
			</div><!--actionButtonGroup-->
			<div class="uiTabContentContainers">
			<% 
				String display =	"block";
				int j_ = 0;
				for(tabconten in uiform.getChildren()){
					if(uiform.getIsSelected(j_)) display =	"block";
					else display = "none";
			%>
				<div style="display:$display;" id="$tabconten.id" class="uiTabContent">
			<% if(tabconten.id.equals(uiform.CATEGORY_SCOPING)) { 
			  _ctx.getRequestContext().getJavascriptManager()
						.require("SHARED/AnswerUtils", null).addScripts("eXo.answer.AnswerUtils.initTreeNode('" + uicomponent.CATEGORY_SCOPING + "');");
			%>
					<div class="TitleMoveThreads"><%=uiform.getLabel("SelectCategory")%>: </div>
					<div class="uiTrees scrollArea">
						<div class="treeContainer">
						<%=uicomponent.renderCategoryTree();%>
						</div>
					</div>

			<% } else if(tabconten.id.equals(uiform.EDIT_TEMPLATE_TAB)) {%>
					<div class="form-horizontal form-edit-template">
						<div class="control-group">	
							<label  class="control-label" for="<%=uiform.FIELD_TEMPLATE_TEXTARE%>"><%=uiform.getLabel(uiform.FIELD_TEMPLATE_TEXTARE);%>: </label>
							<div class="controls largerArea">
								<%uiform.renderField(tabconten.getChildById(uiform.FIELD_TEMPLATE_TEXTARE)) ;%>
							</div>
						</div>
					</div>
			<% } else {%>
					<div class="form-horizontal form-inline">
						<div class="control-group">	
							<label class="control-label checkbox inline" for="<%=uiform.FIELD_USEAJAX_CHECKBOX;%>"><%=uiform.getLabel(uiform.FIELD_USEAJAX_CHECKBOX);%>: </label>
							<div class="controls">
								<%tabconten.renderChild(uiform.FIELD_USEAJAX_CHECKBOX);%>
							</div>
						</div>
					</div>
			<% } %>
				</div>
				<% ++j_;} %>
			</div><!--uiTabContentContainers-->
			<div class="uiAction">
				<button type="button" onclick="<%=uicomponent.event("Save")%>" class="btn"><%=_ctx.appRes("UIFAQSettingForm.action.Save")%></button>
			</div>
		</div>
	</div>
	<%uiform.end()%>
</div>