Your IP : 216.73.216.229


Current Path : /home/jeromecohp/www/aesecure/template/
Upload File :
Current File : /home/jeromecohp/www/aesecure/template/form_enable.default.aec

<p class="text-info"><strong>%PREFACE%</strong></p>
<div>
   %CHECKBOXES%
   <form id="form%ID%" role="form">
      <input type="hidden" name="w" value="%ID%" size="4"/>
      <input type="hidden" name="a" value="1" size="1"/>
      <input type="hidden" name="%AESECURETOKEN%" value="%TOKEN%"/>
      <textarea style="display:none;" disabled="disabled" id="backup%ID%" class="form-control" rows="5">%BACKUPVALUES%</textarea>
      <div data-aesecure="pro" class="form-group pro_options" id="pro_options%ID%">&nbsp;</div>
   </form>
   <br/><span class="text-success"><em><strong>%RECOMMANDED_STATE%:</strong>&nbsp;%RECOMMANDED_STATE_VALUE%</em></span>
</div>

<div id="div%ID%" class="ajaxResult"/>

<script type="text/javascript">

function postProcessing%ID%() { return true; }

   // Initialize Pro functionnalities (if present)
   if (typeof initaeSecurePro !== 'undefined' && $.isFunction(initaeSecurePro)) initaeSecurePro(%ID%);

   $('#tab%ID%switch input[type=checkbox]').checkboxpicker();
   
   $('#tab%ID%switch input[type=checkbox]').on("change", function() {
      var checked = $(this).prop("checked");
      if (checked==true) {
         // Enable the protection
         $('#form%ID% input[name=a]').val(1);
         var formData=$('#form%ID%').serialize();
         SetupTask(%ID%, 'div%ID%',formData,'%FEATURE_ENABLED%','','',true, 'POST','tab%ID%switch','','','%TAG%');
   	} else {
          // Disable the protection
         $('#form%ID% input[name=a]').val(0);
         var formData=$('#form%ID%').serialize();
         SetupTask(%ID%, 'div%ID%',formData,'%FEATURE_DISABLED%','','',true, 'POST','tab%ID%switch','','','%TAG%');
      }
   });

   $('[data-toggle="popover"]').popover({trigger:'hover','placement':'top','html':true});

</script>