HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/survey.nailsbyrianne.nl/public_html/assets/scripts/admin/activatesurvey.js
// Namespace
var LS = LS || {  onDocumentReady: {} };

function openModalActivate(){
    let activateBtn = document.getElementById('ls-activate-survey');
    let surveyId = activateBtn.dataset.surveyid;
    let url = activateBtn.dataset.url;
    //LS.AjaxHelper.ajax
    $.ajax({
        url: url,
        data: {surveyId},
        method: 'POST',
        success: function (result) {
            //set data in modal
            let modalDialog = $('#surveyactivation-modal');

            modalDialog.find('.modal-body').empty().html(result.html);
            if (result.checkFailed) {
                //footer buttons have to be different, if any activation-checks failed
                modalDialog.find('.modal-footer').empty().html(result.footerButton);
            }
            modalDialog.modal('show');
        },
        error: function (result) {
            console.log('error: no data from request for activation modal');
            console.log(result);
        }
    });
}

/**
 * Trigger submit button
 */
function activateWithOptions(){
    //get the selected options from modal
    //ajax request doing all what is necessary in  backend (tokens-table etc.)
    //open another modal to inform user
    document.getElementById('submitActivateSurvey').click();
}