| Current Path : /home/bijouxly/old/aesecure/premium/template/ |
| Current File : /home/bijouxly/old/aesecure/premium/template/form_16_blockpartURL.default.aec |
<div data-aesecure="premium">
<form id="form%ID%" role="form">
<div>%PREFACE%<br/><br/>
<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%"/>
<label for="edt%ID%_url">%URL_TITLE%</label>
<div class="text-info"><em>%URL_SAMPLE%</em></div>
<textarea style="display:none;" disabled="disabled" id="backup%ID%" class="form-control" rows="5">%BACKUPVALUES_URL%</textarea>
<textarea id="edt%ID%_url" name="edt%ID%_url" class="form-control" rows="8" placeholder="%PLACEHOLDER1%">%VALUES_URL%</textarea><br/>
<button id="tab%ID%Add_url" class="btn btn-success aeButton" data-toggle="popover" data-content="%ADDHINT%">%ADD%</button>
<button id="tab%ID%DoIt_url" class="btn btn-success aeButton" data-toggle="popover" data-content="%HINT%">%SAVE%</button>
<button id="tab%ID%Restore_url" class="btn btn-success aeButton" data-toggle="popover" data-content="%RESTOREFROMCONFIGHINT%">%RESTOREFROMCONFIG%</button>
<span data-aesecure="pro">
<button disabled="disabled" id="tab%ID%LoadFromaeSecure_url" class="btn btn-success aeButton" data-toggle="popover" data-content="%LOADFROMAESECUREHINT%">%LOADFROMAESECURE% %AESECUREPRO%</button></div>
</span>
<hr/>
<label for="edt%ID%_querystring">%QUERTYSTRING_TITLE%</label>
<div class="text-info">%QUERTYSTRING_SAMPLE%</div>
<textarea style="display:none;" disabled="disabled" id="backup%ID%" class="form-control" rows="5">%BACKUPVALUES_QUERYSTRING%</textarea>
<textarea id="edt%ID%_querystring" name="edt%ID%_querystring" class="form-control" rows="8" placeholder="%PLACEHOLDER2%">%VALUES_QUERYSTRING%</textarea><br/>
<button id="tab%ID%Add_querystring" class="btn btn-success aeButton" data-toggle="popover" data-content="%ADDHINT%">%ADD%</button>
<button id="tab%ID%DoIt_querystring" class="btn btn-success aeButton" data-toggle="popover" data-content="%HINT%">%SAVE%</button>
<button id="tab%ID%Restore_querystring" class="btn btn-success aeButton" data-toggle="popover" data-content="%RESTOREFROMCONFIGHINT%">%RESTOREFROMCONFIG%</button>
<span data-aesecure="pro">
<button disabled="disabled" id="tab%ID%LoadFromaeSecure_querystring" class="btn btn-success aeButton" data-toggle="popover" data-content="%LOADFROMAESECUREHINT%">%LOADFROMAESECURE% %AESECUREPRO%</button></div>
</span>
</form>
<div id="div%ID%" class="ajaxResult"/>
</div>
<script type="text/javascript">
// Initialize Pro functionnalities (if present)
if (typeof initaeSecurePro !== 'undefined' && $.isFunction(initaeSecurePro)) initaeSecurePro(%ID%);
$('[data-toggle="popover"]').popover({trigger:'hover','placement':'top','html':true});
$("#tab%ID%DoIt_url").click(function(e) {
e.preventDefault();
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.confirm(getLanguageText('main.are_you_sure')+'<br/><br/>%CONFIRM_SAVE%', function (e) {
if (e) {
var formData=$('#form%ID%').serialize();
// Save only the content of edt16_querystring so remove the edt16_querystring information
formData=removeURLParameter(formData,'edt%ID%_querystring');
SetupTask(%ID%, 'div%ID%', formData, '%SAVEDMSG%', '', '', '', 'POST','tab%ID%DoIt_url','','','%TAG%');
}
}); // alertify.confirm
});
$("#tab%ID%DoIt_querystring").click(function(e) {
e.preventDefault();
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.confirm(getLanguageText('main.are_you_sure')+'<br/><br/>%CONFIRM_SAVE%', function (e) {
if (e) {
var formData=$('#form%ID%').serialize();
// Save only the content of edt16_querystring so remove the edt16_url information
formData=removeURLParameter(formData,'edt%ID%_url');
SetupTask(%ID%, 'div%ID%', formData, '%SAVEDMSG%', '', '', '', 'POST','tab%ID%DoIt_querystring','','','%TAG%');
}
}); // alertify.confirm
});
$("#tab%ID%Restore_url").click(function(e) {
e.preventDefault();
$('#edt%ID%_querystring').val($('#backup%ID%_querystring').val());
});
$("#tab%ID%Restore_querystring").click(function(e) {
e.preventDefault();
$('#edt%ID%_querystring').val($('#backup%ID%_querystring').val());
});
$("#tab%ID%Add_url").click(function(e) {
e.preventDefault();
var defaultValue='.*(part-of-url-to-block).*';
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.prompt('%ADDMSG%', function (e, sRegex) {
if (e) {
if (sRegex!=defaultValue) {
if (isRegExValid(sRegex)) {
var sOld=$('#edt%ID%_url').val();
if (sOld!='') sOld +='\n';
$('#edt%ID%_url').val(sOld + sRegex);
}
}
}
}, defaultValue);
});
$("#tab%ID%Add_querystring").click(function(e) {
e.preventDefault();
var defaultValue='.*(part-of-querystring-to-block.*';
alertify.set({ buttonFocus: "cancel", buttonReverse: true });
alertify.prompt('%ADDMSG2%', function (e, sRegex) {
if (e) {
if (sRegex!=defaultValue) {
if (isRegExValid(sRegex)) $('#edt%ID%_querystring').val($('#edt%ID%_querystring').val() + "\n" + sRegex);
}
}
}, defaultValue);
});
</script>
<style>
.alertify{width:1280px !important;margin-left: -640px;max-height:700px;overflow:auto;}
</style>