Your IP : 216.73.216.229


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

<p class="text-info"><strong>%PREFACE%</strong></p>
<div>

   <button id="btnSeeHTAccess" type="button" class="btn btn-info switch-large" style="" title="%AESECURESEEHTACCESS_HINT%">%AESECURESEECURRENTHTACCESS%</button><br/><br/>
   %CHECKBOXES%
   <br/>
   <span class="text-success"><em><strong>%RECOMMANDED_STATE%:</strong>&nbsp;%RECOMMANDED_STATE_VALUE%</em></span>

   <div id="div%ID%" class="ajaxResult"><!-- AESECURE_STATUS --></div>

   <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>
</div>
<script type="text/javascript">

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

// Once the option 1.1 is enabled, enable back other options that was already active on the site
function processTask11() {
   $('[data-toggle="popover"]').popover({trigger:'hover','placement':'top','html':true});
   return true;
} // function processTask11()
       
   // 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();
        
         // Enable the option 1.1 and restore any others functionnalities by calling processTask11()
         SetupTask(%ID%, 'div%ID%',formData,'%FEATURE_ENABLED%','','processTask11()',true, 'POST','tab%ID%DoIt','','','%TAG%');

   	} else { // if (checked==true)
         // Disable the protection
         $('#form%ID% input[name=a]').val(0);
         var formData=$('#form%ID%').serialize();

         // Disable 1.1
         SetupTask(%ID%, 'div%ID%',formData,'%FEATURE_DISABLED%','','',true,'POST','tab%ID%DoIt','','','%TAG%');

      } // if (data.value==true)

   });

$("#btnSeeHTAccess").click(function (e){ 
      $("#seehtaccess").trigger("click");
   });

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

</script>
<style>
#aeSecureActiveFunctionnalities .popover{width:auto;min-width:200px;max-width:800px;height:auto;}
</style>