%PDF- %PDF-
| Direktori : /opt/pyxsoft/templates/settings/ |
| Current File : //opt/pyxsoft/templates/settings/brute_force_protection.tmpl |
{% extends "template-base/index.tmpl" %}
{% block HTMLTitle %}{{ HTMLTitle }}{% endblock %}
{% block PageTitle %}{{ PageTitle }}{% endblock %}
{% block contenido %}
<form class="" method="" id="idForm" action="#" style="width: 90%; margin: 0 auto;">
<fieldset class="form-group">
<h2>{{Tr(Lang,"settings.btf_protection")}}</h2>
<div class="row">
<div class="col-md-9">
<div class="col-md-6">
<p>{{Tr(Lang,"settings.btfp_intro")}}</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="col-md-3">
<p>{{Tr(Lang,"settings.enable_btfp")}}</p>
</div>
<div class="col-md-2">
<label for="EnableBTFProtection" class="switcher switcher-rounded switcher-info">
{% if configBTFP.Enabled == true %}
<input id="EnableBTFProtection" name="EnableBTFProtection" checked type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% else %}
<input id="EnableBTFProtection" name="EnableBTFProtection" type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% endif %}
</label>
</div>
<div class="col-md-3">
<p>{{ Tr(Lang,"settings.recommended_yes") }}</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="col-md-3">
<p>{{Tr(Lang,"settings.notify_simple_bf")}}</p>
</div>
<div class="col-md-2">
<label for="NotifySimpleBF" class="switcher switcher-rounded switcher-info">
{% if configBTFP.NotifySimpleBF == true %}
<input id="NotifySimpleBF" name="NotifySimpleBF" checked type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% else %}
<input id="NotifySimpleBF" name="NotifySimpleBF" type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% endif %}
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="col-md-3">
<p>{{Tr(Lang,"settings.enable_distributed")}}</p>
</div>
<div class="col-md-2">
<label for="EnableDistributedProtection" class="switcher switcher-rounded switcher-info">
{% if configBTFP.EnableDistributedProt == true %}
<input id="EnableDistributedProtection" name="EnableDistributedProtection" checked type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% else %}
<input id="EnableDistributedProtection" name="EnableDistributedProtection" type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% endif %}
</label>
</div>
<div class="col-md-3">
<p>{{ Tr(Lang,"settings.recommended_yes") }}</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="col-md-3">
<p>{{Tr(Lang,"settings.notify_distributed_ip")}}</p>
</div>
<div class="col-md-2">
<label for="NotifyDistributedIp" class="switcher switcher-rounded switcher-info">
{% if configBTFP.NotifyDistributedBF == true %}
<input id="NotifyDistributedIp" name="NotifyDistributedIp" checked type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% else %}
<input id="NotifyDistributedIp" name="NotifyDistributedIp" type="checkbox">
<div class="switcher-indicator" style="margin: auto;">
<div class="switcher-yes">YES</div>
<div class="switcher-no">NO</div>
</div>
{% endif %}
</label>
</div>
<div class="col-md-3">
<p>{{ Tr(Lang,"settings.recommended_no") }}</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="pull-right">
<button type="button" id="btnSave" class="btn btn-info" onclick="verifyData()">{{Tr(Lang,"settings.btn_save")}}</button>
</div>
</div>
</fieldset>
</form>
{% endblock %}
{% block finalScripts %}
<script>
function verifyData(){
var EnableBTFProtection = document.getElementById('EnableBTFProtection').checked;
var NotifySimpleBF = document.getElementById('NotifySimpleBF').checked;
var EnableDistributedProtection = document.getElementById('EnableDistributedProtection').checked;
var NotifyDistributedIp = document.getElementById('NotifyDistributedIp').checked;
//alert(NotifyDistributedIp);
urlPost = '/settingsbtfp';
$.ajax({
url: urlPost,
type: 'POST',
data: jQuery.param({ EnableBTFProtection: EnableBTFProtection, NotifySimpleBF : NotifySimpleBF, EnableDistributedProtection : EnableDistributedProtection, NotifyDistributedIp: NotifyDistributedIp}),
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function (response) {
$.growl({ title: "Success", message: "Settings saved!", style: "notice", size: "large" });
},
error: function () {
alert("Error")
}
});
}
</script>
{% endblock %}