# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: data_protection
    title: Editing Data Protection settings
    tabs:
        data_protection:
            ord: 11
            label: Data recording and deletion
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            notices:
                scheduled_task_not_running:
                    type: warning
                    message: | 
                        The scheduled task "jobDataProtectionCleanup" is not running. Data will be deleted when there is activity in the appropriate type of data handling (e.g. when an email is sent, a user logs in, an error is logged, or a form is submitted).
                    show: false
                scheduled_task_running:
                    type: success
                    message: |
                        The scheduled task "jobDataProtectionCleanup" is running. Data will be deleted according to these rules on a daily basis.
                    show: false
            fields:
                description:
                    snippet:
                        html: |
                            <p>Zenario can log emails that it sends (to visitors, users or administrators). It can log when extranet users log in and access content, and it can log data submitted through forms.</p>
                            <p>Note that data will not be deleted immediately when you save this box, but according to the rules described below.</p>
                
                period_to_delete_the_email_template_sending_log_headers:
                    label: 'How long should emails sent from this site be saved?'
                    site_setting:
                        name: period_to_delete_the_email_template_sending_log_headers
                    type: select
                    ord: 6
                    values:
                        0:
                            label: Don't save
                        1:
                            label: Delete after 1 day
                        7:
                            label: Delete after 1 week
                        14:
                            label: Delete after 2 weeks
                        30:
                            label: Delete after 1 month
                        90:
                            label: Delete after 3 months
                        180:
                            label: Delete after 6 months
                        270:
                            label: Delete after 9 months
                        365:
                            label: Delete after 1 year
                        730: 
                            label: Delete after 2 years
                        never_delete:
                            label: Save forever  
                    value: never_delete
                    redraw_onchange: true
                
                delete_email_template_sending_log_content_sooner:
                    visible_if: zenarioAB.value('period_to_delete_the_email_template_sending_log_headers') != '0'
                    indent: 1
                    site_setting:
                        name: delete_email_template_sending_log_content_sooner
                    label: Delete email body sooner (just save headers)
                    ord: 7
                    type: checkbox
                    redraw_onchange: true
                
                period_to_delete_the_email_template_sending_log_content:
                    visible_if: zenarioAB.value('delete_email_template_sending_log_content_sooner')
                    hide_with_previous_field: true
                    indent: 2
                    site_setting:
                        name: period_to_delete_the_email_template_sending_log_content
                    ord: 8
                    type: select
                    values:
                        0:
                            label: Don't save email body
                        1:
                            label: Delete after 1 day   
                        7:
                            label: Delete after 1 week
                        14:
                            label: Delete after 2 weeks
                        30:
                            label: Delete after 1 month
                        90:
                            label: Delete after 3 months
                        180:
                            label: Delete after 6 months
                        270:
                            label: Delete after 9 months
                        365:
                            label: Delete after 1 year
                        730: 
                            label: Delete after 2 years
                
                period_to_delete_error_log:
                    ord: 100
                    site_setting:
                        name: period_to_delete_error_log
                    label: "Delete data from error log:"
                    type: select
                    values:
                        "never_delete":
                            label: Never delete
                            ord: 1
                        "90":
                            label: Delete data older than 3 months
                            ord: 2
                        "180":
                            label: Delete data older than 6 months
                            ord: 4
                        "365":
                            label: Delete data older than 1 year
                            ord: 5
                        "730":
                            label: Delete data older than 2 years
                            ord: 6
                        "1095":
                            label: Delete data older than 3 years
                            ord: "7"
                    value: "never_delete"
        security:
            ord: 15
            label: Security
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
            fields:
                description:
                    full_width: true
                    snippet:
                        html: This tab contains settings for security.
                new_admin_email_expiry:
                    site_setting:
                        name: new_admin_email_expiry
                    label: Expiry time for new admin notifications
                    type: select
                    values:
                        1:
                            label: 1 day
                        3:
                            label: 3 days
                        7:
                            label: 7 days
                    value: 7
                    side_note: When a new admin is created they are sent a link that they can use to access the site and set a password for their accounts. Choose how long it takes before this link expires.
                
                zenario_site_description:
                    type: grouping
                    name: zenario_site_description
                
                enable_two_factor_authentication_for_admin_logins:
                    legend: Set in the <code>zenario_custom/site_description.yaml</code> file
                    grouping: zenario_site_description
                    
                    label: Require two-factor authentication on login
                    type: checkbox
                    readonly: true
                    post_field_html: |
                        (<code>enable_two_factor_authentication_for_admin_logins</code>)
                    note_below: |
                        If enabled, an admin must verify access to their email when logging into the site.
                
                two_factor_authentication_timeout:
                    indent: 1
                    grouping: zenario_site_description
                    label: Timeout for two-factor authentication
                    pre_field_post_label_html: |
                        (<code>two_factor_authentication_timeout</code>)
                    type: text
                    readonly: true
                    style: |
                        width: 4em;
                    note_below: |
                        The length of time (in days) before an administrator
                        needs to verify access to their email again.
                    visible_if: lib.value('enable_two_factor_authentication_for_admin_logins')
                
                apply_two_factor_authentication_by_ip:
                    indent: 1
                    grouping: zenario_site_description
                    label: Apply two-factor authentication on a per-IP basis
                    type: checkbox
                    readonly: true
                    post_field_html: |
                        (<code>apply_two_factor_authentication_by_ip</code>)
                    note_below: |
                        If enabled, an admin must verify access for each IP address they use to access the site.
                    visible_if: lib.value('enable_two_factor_authentication_for_admin_logins')
                
        backup:
            ord: 20
            label: Backups
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                manual_backups:
                    label: 'Manual backups:'
                    snippet:
                        html: ''
                automated_backups:
                    label: 'Automated backups:'
                    snippet:
                        html: ''
                
        
        staging_mode:
            ord: 25
            label: Staging mode
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                desc:
                    snippet:
                        html: |
                            <p>You can use staging mode to share a draft of a content
                            item with a colleague who's not a Zenario administrator.</p>
                            <p>(This works for content items with permissions set to
                            <em style="font-style: italic;">
                                &ldquo;Public: visible to everyone&rdquo;
                            </em> but not private content items.)</p>
                enable_staging_mode:
                    site_setting:
                        name: enable_staging_mode
                    type: checkbox
                    label: Enable staging mode
                    value: 1
