# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: cookies
    title: Cookie control
    hide_tab_bar: false
    tabs:
        cookies:
            label: Cookie policy
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>You can control when this site can place cookies on a visitor's browser.</p>
                            <p>Zenario can display simple "Continue" button (implied cookie consent), or a sequence of two popup boxes (where explicit consent is asked for, with one small box with summary info, and one large box with more detail about the types of cookies). The large box can be accessed again via the Footer menu.</p>
                
                cookie_require_consent:
                    site_setting:
                        name: cookie_require_consent
                    type: select
                    value: ""
                    label: 'Cookie policy:'
                    empty_value: "Don't inform visitor or require consent when setting cookies"
                    values:
                        implied:
                            ord: 1
                            label: 'Implied consent: inform visitor that cookies are being set'
                        explicit:
                            ord: 2
                            label: "Explicit consent: require visitor's consent before setting cookies (recommended)"
                    format_onchange: true
                
                description__dont_inform:
                    snippet:
                        html: |
                            <p>
                                Modules that set cookies may do so irrespective of the visitor's action.
                            </p>
                    visible_if: |
                        !zenarioAB.value('cookie_require_consent')
                cookie_consent_type_implied:
                    label: 'Message for visitor:'
                    type: select
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'implied'
                    indent: 1
                    values:
                        message_continue: A consent message with a "Continue" button
                    redraw_onchange: true
                description__implied:
                    snippet:
                        html: |
                            <p>
                                A panel will appear on every page of your site, but only on the visitor's
                                first page load. On subsequent page loads or visits, the panel does not appear.
                            </p><p>
                                Modules that set cookies may do so irrespective of the visitor's action.
                            </p>
                    visible_if: "zenarioAB.value('cookie_require_consent') == 'implied'"
                    indent: 1
                description__explicit__message_accept_reject:
                    snippet:
                        html: |
                            <p>
                                A panel will appear on every page of your site, until the visitor presses either
                                the &quot;Accept&quot; or &quot;Manage cookies&quot; button.
                            </p><p>
                                Modules will not set cookies until the visitor presses the &quot;Accept&quot; button.
                                (A PHP session cookie will be placed on the visitor's computer regardless of this setting.)
                            </p>
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    indent: 1
                
                cookie_box1_01_implied_msg:
                    site_setting:
                        name: cookie_box1_01_implied_msg
                    value: "This site uses cookies, and places cookies on your computer to provide you with the best experience. If you continue to use this site, we will assume that you consent to this. Please see our privacy policy for more information."
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'implied'
                    label: "Initial message:"
                    type: editor
                    editor_type: description_editor
                    validation:
                        required_if_not_hidden: Please enter a message
                    note_below: 'The CSS class will be "cookies_implied".'
                cookie_box1_02_continue_btn:
                    site_setting:
                        name: cookie_box1_02_continue_btn
                    value: "Continue"
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'implied'
                    label: '"Continue" button text:'
                    type: text
                    validation:
                        required_if_not_hidden: true
                
                cookie_box_1:
                    type: grouping
                    grouping_css_class: cookie_box
                    visible_if: zenarioAB.value('cookie_require_consent') == 'explicit'
                cookie_box1_03_cookie_consent_msg:
                    site_setting:
                        name: cookie_box1_03_cookie_consent_msg
                    value: "This site would like to place cookies on your computer. These are designed to improve your experience and provide personalised content. You can accept all cookies, or find out more and accept only certain types."
                    grouping: cookie_box_1
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: "Initial popup message:"
                    type: editor
                    editor_type: description_editor
                    validation:
                        required_if_not_hidden: Please enter a message
                    note_below: 'The CSS class will be "cookies_explicit".'
                cookie_box1_05_accept_btn:
                    site_setting:
                        name: cookie_box1_05_accept_btn
                    value: "Accept all"
                    grouping: cookie_box_1
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: '"Accept cookies" button text:'
                    note_below: |
                        If the visitor clicks this button, they agree to accept all cookies without seeing further information.
                    type: text
                    validation:
                        required_if_not_hidden: true
                cookie_box1_04_manage_btn:
                    site_setting:
                        name: cookie_box1_04_manage_btn
                    value: "Manage cookies"
                    grouping: cookie_box_1
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: '"Manage cookies" button text:'
                    note_below: |
                        If the user clicks this button, they will see a "Manage cookies" popup box. They will be able to access this again later, usually via the Footer menu.
                    type: text
                    validation:
                        required_if_not_hidden: true
                cookie_box_2:
                    type: grouping
                    grouping_css_class: cookie_box
                    visible_if: zenarioAB.value('cookie_require_consent') == 'explicit'
                cookie_box2_01_intro_msg:
                    site_setting:
                        name: cookie_box2_01_intro_msg
                    value: "<h2>Cookie settings</h2><p>This site uses cookies, which are small text files, to improve your experience and show you personalised content. You can accept all cookies, or manage them by type.</p><p>You can find out more on our privacy page.</p>"
                    grouping: cookie_box_2
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: '"Manage cookies" popup message:'
                    type: editor
                    editor_type: description_editor
                    validation:
                        required_if_not_hidden: Please enter a message.
                cookie_show_image:
                    grouping: cookie_box_2
                    indent: 1
                    site_setting:
                        name: cookie_show_image
                    type: checkbox
                    label: "Show an image"
                    format_onchange: true
                    visible_if: zenarioAB.value('cookie_require_consent') == 'explicit'
                cookie_image:
                    grouping: cookie_box_2
                    indent: 2
                    site_setting:
                        name: cookie_image
                    pick_items:
                        path: zenario__library/panels/special_images
                        min_path: zenario__library/panels/special_images
                        max_path: zenario__library/panels/special_images
                        target_path: zenario__library/panels/special_images
                        select_phrase: Select from special images library...
                    upload: 
                        accept: "image/*"
                        extensions: 
                            - .svg
                            - .jpg
                            - .jpeg
                            - .png
                        drag_and_drop: false
                    visible_if: zenarioAB.value('cookie_require_consent') == 'explicit' && zenarioAB.value('cookie_show_image')
                    validation:
                        required_if_not_hidden: Please select an image.
                        must_be_image_or_svg: The cookie image must be a file with format .svg, .jpg, .jpeg or .png.
                    format_onchange: true
                    note_below: "You may upload an <code>.svg</code>, <code>.jpg</code>, <code>.jpeg</code> or <code>.png</code> file."
                cookie_image_canvas:
                    grouping: cookie_box_2
                    indent: 2
                    site_setting:
                        name: cookie_image_canvas
                    label: 'Image canvas:'
                    type: select
                    format_onchange: true
                    value: fixed_width_and_height
                    values:
                        fixed_width:
                            label: Constrain by width
                        fixed_height:
                            label: Constrain by height
                        fixed_width_and_height:
                            label: Constrain by width and height
                cookie_image_width:
                    grouping: cookie_box_2
                    indent: 3
                    site_setting:
                        name: cookie_image_width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width in pixels.
                        non_zero_number: Please enter a whole number greater than 0.
                        integer_number: Please enter a whole number greater than 0.
                        positive_number: Please enter a whole number greater than 0.
                    value: 275
                    maxlength: 5
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                cookie_image_height:
                    grouping: cookie_box_2
                    indent: 3
                    site_setting:
                        name: cookie_image_height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height in pixels.
                        non_zero_number: Please enter a whole number greater than 0.
                        integer_number: Please enter a whole number greater than 0.
                        positive_number: Please enter a whole number greater than 0.
                    value: 60
                    maxlength: 5
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                cookie_box2_02_accept_all_btn:
                    site_setting:
                        name: cookie_box2_02_accept_all_btn
                    value: "Accept all"
                    grouping: cookie_box_2
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: '"Allow all cookies" button text:'
                    note_below: |
                        In the large popup box, the text for the "Accept all cookies" button.
                    type: text
                    validation:
                        required_if_not_hidden: true
                cookie_box2_11_save_preferences_btn:
                    site_setting:
                        name: cookie_box2_11_save_preferences_btn
                    value: "Save preferences"
                    grouping: cookie_box_2
                    indent: 1
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: '"Save preferences" button text:'
                    note_below: |
                        In the large popup box, the text for the "Save preferences" button.
                    type: text
                    validation:
                        required_if_not_hidden: true
                popup_cookie_type_switches_initial_state:
                    grouping: cookie_box_2
                    indent: 1
                    site_setting:
                        name: popup_cookie_type_switches_initial_state
                    visible_if: |
                        zenarioAB.value('cookie_require_consent') == 'explicit'
                    label: 'In popup message, cookie-type switches should appear to new visitors in an initial state of:'
                    type: radios
                    value: 'off'
                    values:
                        off:
                            ord: 1
                            label: "Off"
                        on:
                            ord: 2
                            label: "On"
                    validation:
                        required_if_not_hidden: "Please select a value."
                extranet_info:
                    grouping: cookie_box_2
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                Extranet plugins will only be loaded when a user accepts Functionality-type cookies.
                            </div>
                    visible_if: zenarioAB.value('cookie_require_consent') == 'explicit'
        
        recaptcha_policy:
            label: reCaptcha policy
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                Zenario forms and other interfaces can combat spam by displaying a captcha using Google reCaptcha 2.0, to discern between a human visitor and a bot.
                            </p>
                            <p>
                                The Google reCaptcha system issues cookies to a visitor's browser when they view the captcha.
                            </p>
                            <p>
                                This could potentially contravene a visitor's choices of whether to accept cookies. If a visitor hasn't accepted "all cookies", or at least Analytical and Functional cookies, when they see a form that uses reCaptcha 2.0, then the reCaptcha could be placing cookies on their browser that they have not agreed to accept.
                            </p>
                recaptcha_warning:
                    snippet:
                        html: |
                            <div class="zenario_fbWarning">
                                Zenario is storing a Site Key and Secret Key in "API keys", so it looks like reCaptcha may be in use.
                            </div>
                    hidden: true
                recaptcha_info:
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                Zenario is not storing a Site Key or Secret Key in "API keys", so reCaptcha may not be in use.
                            </div>
                    hidden: false
                recaptcha_form_policy:
                    site_setting:
                        name: recaptcha_form_policy
                    label: What should happen when a visitor hasn't accepted "all cookies", or Analytical and Functional cookies, and they view a form that uses Google reCaptcha 2.0?
                    type: radios
                    values:
                        require_visitor_accepts_analytics_and_functional_cookies:
                            ord: 1
                            label: Require visitor to accept Analytics and Functional cookies before showing the form
                        show_form_without_recaptcha:
                            ord: 2
                            label: Show the form anyway, without the reCaptcha
                    value: require_visitor_accepts_analytics_and_functional_cookies
        
        cookie_timeouts:
            label: Timeouts
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                The length of time that the cookie consent, &quot;remember me&quot;
                                and &quot;Log me in automatically&quot; options last.
                            </p>
                
                zenario_siteconfig:
                    type: grouping
                    name: zenario_siteconfig
                
                cookie_timeout:
                    grouping: zenario_siteconfig
                    legend: Set in the <code>zenario_siteconfig.php</code> file
                    
                    label: 'Cookie timeout:'
                    pre_field_post_label_html: |
                        (<code>COOKIE_TIMEOUT</code>)
                    readonly: true
                    type: text
