<%@ page contentType="text/html; charset=UTF-8"%><%@ include file="/WEB-INF/jspf/include/taglibs.jsp"%>

<div id="paramResult"></div>

<div style="margin: 10px auto;"><button class="btn btn-secondary" onclick="showBlock( 'parametersRoot', 'list', parametersQuery ); return false;">К списку...</button></div>			

<form>
<div class="tile">
	<div class="titleFont3 titleBottomLine">Редактор параметра</div>
	<div class="paramEditorTitle" style="margin-top: 20px;">${pref.title}</div>
	<div class="paramEditorValue" style="text-align: center; margin-top: 15px;">
		<input type="hidden" name="paramFlagValue" value="${paramValue}" id="paramFlagValue" size="5">
		<c:set var="onClass"><c:if test="${paramValue eq 'on'}">paramEditorButtonSelected</c:if></c:set>
		<c:set var="offClass"><c:if test="${paramValue eq 'off'}">paramEditorButtonSelected</c:if></c:set>
		<button class="paramTypeFlag ${onClass}" style="width: 45%" onclick='this.form.paramFlagValue.value="on"; jQuery("button.paramTypeFlag").removeClass("paramEditorButtonSelected"); jQuery(this).addClass("paramEditorButtonSelected"); return false;'>Включено</button> &nbsp;&nbsp;&nbsp;
		<button class="paramTypeFlag ${offClass}" style="width: 45%" onclick='this.form.paramFlagValue.value="off"; jQuery("button.paramTypeFlag").removeClass("paramEditorButtonSelected"); jQuery(this).addClass("paramEditorButtonSelected"); return false;'>Выключено</button>
	</div>
	<div style="margin: 20px 10px; text-align: right;">
		<button class="btn btn-primary" onclick="showBlock( 'paramResult', 'update', { ...parametersQuery, paramValue: this.form.paramFlagValue.value, paramId: ${pref.id} } ); return false;">Применить</button>
		<button class="btn btn-outline-primary" style="margin-left: 20px;" onclick="showBlock( 'parametersRoot', 'list', parametersQuery ); return false;">Отмена</button>
	</div>
	
</div>
</form>