<commit_before>Kwf.onElementReady('.kwcStatisticsOpt .webForm', function(el, config) {
    el.kwcForm.findField('form_opt').el.on('change', function() {
        this.kwcForm.submit();
    }, el);
    el.kwcForm.on('submitSuccess', function () {
        if (el.kwcForm.findField('form_opt').getValue()) {
            Kwf.fireComponentEvent('cookieOptChanged', 'in');
        } else {
            Kwf.fireComponentEvent('cookieOptChanged', 'out');
        }
    }, el);
    Kwf.onComponentEvent('cookieOptChanged', function(value) {
        if (value == 'in') {
            el.kwcForm.findField('form_opt').setValue(true);
        } else if (value == 'out') {
            el.kwcForm.findField('form_opt').setValue(false);
        }
    });
}, {defer: true});<commit_msg>Show correct text when clicking cookie opt checkbox<commit_after>Kwf.onElementReady('.kwcStatisticsOpt .webForm', function(el, config) {
    el.kwcForm.findField('form_opt').el.on('change', function() {
        this.kwcForm.submit();
    }, el);
    el.kwcForm.on('submitSuccess', function () {
        if (el.kwcForm.findField('form_opt').getValue()) {
            Kwf.fireComponentEvent('cookieOptChanged', 'in');
        } else {
            Kwf.fireComponentEvent('cookieOptChanged', 'out');
        }
    }, el);
    Kwf.onComponentEvent('cookieOptChanged', function(value) {
        var field = el.kwcForm.findField('form_opt');
        if (value == 'in') {
            var fieldValue = true;
            var labelText = trlKwf('Cookies are set when visiting this webpage. Click to deactivate cookies.');
        } else {
            var fieldValue = false;
            var labelText = trlKwf('No cookies are set when visiting this webpage. Click to activate cookies.');
        }
        field.setValue(fieldValue);
        field.el.child('.boxLabel').update(labelText);
    });
}, {defer: true});
{'fraction_non_alphanumeric': 0.15651709401709402, 'fraction_numerical': 0.0, 'mean_word_length': 2.7610441767068274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7470400', 'n_tokens_mistral': 569, 'n_tokens_neox': 559, 'n_words': 101}