# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: users
    title: Editing settings for User and Contact data
    tabs:
        names:
            label: Identifiers
            show_errors_after_field: description
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false

            fields:
                description:
                    full_width: true
                    snippet:
                        p: |
                            All users and contacts have a unique identifier. For most sites this is created automatically from the first and last names, while for sites with social features (e.g. where people post comments), a screen name will be used.
                user_use_screen_name:
                    site_setting:
                        name: user_use_screen_name
                    label: 'Use screen names'
                    side_note: Only recommended if the site will have users posting public messages such as comments and forum messages.
                    type: checkbox
                    value: 1
                user_chars_from_first_name:
                    site_setting:
                        name: user_chars_from_first_name
                    pre_field_html: |
                        If screen names are not used, a unique identifier will be auto-generated, for administrator use only. To avoid collisions, numeric digits may be appended automatically.
                        <br/>
                        <br/>
                        Generate identifiers with&nbsp;
                    type: select
                    value: 99
                    values:
                        1:
                            label: the first character
                        2:
                            label: the first two characters
                        3:
                            label: the first three characters
                        4:
                            label: the first four characters
                        5:
                            label: the first five characters
                        99:
                            label: all characters
                user_chars_from_last_name:
                    site_setting:
                        name: user_chars_from_last_name
                    same_row: true
                    pre_field_html: |
                        from the user's first name and&nbsp;
                    type: select
                    value: 99
                    values:
                        1:
                            label: the first character
                        2:
                            label: the first two characters
                        3:
                            label: the first three characters
                        4:
                            label: the first four characters
                        5:
                            label: the first five characters
                        99:
                            label: all characters
                user_chars_from_name:
                    site_setting:
                        name: user_chars_from_name
                    same_row: true
                    pre_field_html: |
                        from the user's last name.
                        <br/>
                        <br/>
                        (If only one name is known then pick&nbsp;
                    type: select
                    value: 99
                    values:
                        1:
                            label: the first character
                        2:
                            label: the first two characters
                        3:
                            label: the first three characters
                        4:
                            label: the first four characters
                        5:
                            label: the first five characters
                        99:
                            label: all characters
                    post_field_html: |
                        &nbsp;from that name.)

                data_protection_link:
                    snippet:
                        html: ''
                
        
        passwords:
            label: Passwords
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                password_requirements:
                    type: grouping
                    snippet:
                        label: "User password requirements"
                        label_class: subheading
                zenario_extranet:
                    type: grouping
                min_extranet_user_password_score:
                    label: 'Minimum score:'
                    grouping: password_requirements
                    site_setting:
                        name: min_extranet_user_password_score
                    type: text
                    value: 3
                    style: 'width: 50px;'
                    slider:
                        range: min
                        min: 0
                        max: 4
                        before_field: true
                    validation:
                        numeric: true
                user_password_score_info:
                    grouping: password_requirements
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                Password score:<br />
                                4: Very strong password, very unguessable and provides strong protection from offline slow-hash scenario.<br />
                                3: Strong password, safely unguessable, offers moderate protection from offline slow-hash scenario.<br />
                                2: Moderate password, somewhat guessable, provides some protection from unthrottled online attacks.<br />
                                1: Weak password, very guessable.<br />
                                0: Very weak password, extremely guessable.<br />
                            </div>
                min_extranet_user_password_length:
                    label: 'Minimum length:'
                    grouping: password_requirements
                    site_setting:
                        name: min_extranet_user_password_length
                    type: text
                    style: "width:50px;"
                    slider:
                        range: min
                        min: 0
                        max: 32
                        before_field: true
                    validation:
                        numeric: true
                    # The <br /> tags above are required, as Extranet Base module adds its own field
                    # with pre- and post-field HTML, which blends with the snippet above.
                user_password_creation_info:
                    grouping: password_requirements
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                When setting a user password, Zenario will only accept a password if it is greater or equal to the minimum length and passes the selected score.
                                <br />The password generator will create a password of this length and which passes the selected score.
                            </div>
        activation_email_template:
            label: "Emails"
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                Select the default email template to be sent to new users when an administrator activates their account or resets heir password.
                            </p>
                            <p>
                                (Where a user signs up or resets their own password, the choice of email template is determined by the relevant extranet-related plugin.)
                            </p>
                default_creation_email_template:
                    site_setting:
                        name: default_creation_email_template
                    label: 'Creation email template:'
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        select_phrase: Select email template...
                        hide_remove_button: Yes
                    value: zenario_users__to_user_account_created
                default_activation_email_template:
                    site_setting:
                        name: default_activation_email_template
                    label: 'Activation email template:'
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        select_phrase: Select email template...
                        hide_remove_button: Yes
                    value: zenario_users__to_user_account_activated
                default_verification_email_template:
                    site_setting:
                        name: default_verification_email_template
                    label: 'Verification email template:'
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        select_phrase: Select email template...
                        hide_remove_button: Yes
                    value: zenario_extranet__to_user_email_verification_admin
                verification_email_expiry_period:
                    site_setting:
                        name: verification_email_expiry_period
                    label: 'If an admin sends a verification email to a user, the link should expire in:'
                    type: text
                    post_field_html: '&nbsp;hour(s)'
                    maxlength: 2
                    style: "width: 2em;"
                    value: 6
                    validation:
                        numeric: 'Please enter a whole number between 1 and 48.'
                        integer_number: 'Please enter a whole number between 1 and 48.'
                default_password_reset_email_template:
                    site_setting:
                        name: default_password_reset_email_template
                    label: 'Password reset email template:'
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        select_phrase: Select email template...
                        hide_remove_button: Yes
                    value: zenario_users__to_user_password_reset
                extranet_not_running:
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                The "Extranet Base Module and Login" module is not running, so no user-related email settings are available.
                            </div>
        groups:
            label: Options
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                groups:
                    type: grouping
                user_image_options:
                    type: grouping
                    snippet:
                        label: "Maximum file size for user-related images:"
                        label_class: subheading
                default_groups_dataset_tab:
                    grouping: groups
                    site_setting:
                        name: default_groups_dataset_tab
                    label: 'Default Groups tab in the User/Contact admin box:'
                    type: select
                    value: groups
                    side_note: |
                        This defines which tab of User/Contact admin box contains the Groups checboxes. If creating a group, it will appear on this tab. Go to Datasets->Users to re-arrange.
                max_user_image_filesize_override:
                    grouping: user_image_options
                    site_setting:
                        name: max_user_image_filesize_override
                    label: "Restrict user/contact-related images to..."
                    type: checkbox
                    value: false
                    redraw_onchange: true
                max_user_image_filesize:
                    grouping: user_image_options
                    indent: 1
                    site_setting:
                        name: max_user_image_filesize
                    label: 'Maximum image file size:'
                    type: text
                    value: 50
                    side_note: >
                        Maximum allowed file size for all user/contact images (e.g. avatars or location images) uploaded by extranet users.
                    validation:
                        required_if_not_hidden: Please enter a maximum allowed image file size.
                        numeric: The number must be numeric.
                    decimal_places: ""
                    visible_if: lib.value('max_user_image_filesize_override')
                    maxlength: 10
                    style: "width: 7em;"
                max_user_image_filesize_unit:
                    grouping: user_image_options
                    indent: 1
                    site_setting:
                        name: max_user_image_filesize_unit
                    label: 'Unit:'
                    same_row: true
                    type: select
                    values:
                        KB:
                            label: KB
                        MB:
                            label: MB
                        GB:
                            label: GB
                    value: KB
                    redraw_onchange: true
                    visible_if: lib.value('max_user_image_filesize_override')
                apply_file_size_limit_to:
                    grouping: user_image_options
                    indent: 1
                    site_setting:
                        name: apply_file_size_limit_to
                    type: select
                    values:
                        uploads_by_users:
                            ord: 1
                            label: 'Apply only to uploads by users'
                        always_apply:
                            ord: 2
                            label: 'Apply always'
                    value: uploads_by_users
                    visible_if: lib.value('max_user_image_filesize_override')
                global_upload_setting_info:
                    grouping: user_image_options
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                [[global_upload_setting_string]]
                            </div>
        
        countries:
            label: Countries
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
            fields:
                description:
                    snippet:
                        p: |
                            Use this to enable country-based permissions for extranet users.
                            When editing an extranet user, you will be able to set which countries they are associated with.
                users_use_linked_countries:
                    site_setting:
                        name: users_use_linked_countries
                    label: 'Enable country-based permissions'
                    type: checkbox
                    value: ''
        
        unconfirmed_users:
            label: Unconfirmed users
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                Zenario can delete the accounts of people who sign up, but who never confirm their email address. Use the setting below to have these users deleted after a period of time.
                            </p>
                remove_inactive_users:
                    site_setting:
                        name: remove_inactive_users
                    label: 'Delete unconfirmed user accounts'
                    type: checkbox
                    format_onchange: true
                    side_note: Accounts for users will be deleted where their status is Pending and the email verified flag is not set.
                max_days_user_inactive:
                    indent: 1
                    site_setting:
                        name: max_days_user_inactive
                    label: 'If a user fails to confirm their email address after signing up, delete account after:'
                    type: select
                    values:
                        2:
                            label: 2 days
                            ord: 1
                        3:
                            label: 3 days
                            ord: 2
                        7:
                            label: 7 days
                            ord: 3
                        14:
                            label: 14 days
                            ord: 4
                        21:
                            label: 21 days
                            ord: 5
                        28:
                            label: 28 days
                            ord: 6
                        45:
                            label: 45 days
                            ord: 7
                        60:
                            label: 60 days
                            ord: 8
                        90:
                            label: 90 days
                            ord: 9
                    value: 90
                    side_note: This setting affects the scheduled task "jobRemoveInactivePendingUsers".
        inactive_user_email:
            label: Follow-up emails
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: false
            fields:
                description:
                    full_width: true
                    snippet:
                        html: |
                            <p>
                                This option allow you send up to 2 emails to users who are not logging in.
                            
                                These emails will be sent by a scheduled task.
                            </p>
                time_user_inactive_1:
                    site_setting:
                        name: time_user_inactive_1
                    label: 'Select user inactivity period:'
                    type: select
                    values:
                        2_weeks:
                            label: 2 weeks
                            ord: 1
                        3_weeks:
                            label: 3 weeks
                            ord: 2
                        4_weeks:
                            label: 4 weeks
                            ord: 3
                        6_weeks:
                            label: 6 weeks
                            ord: 4
                        2_months:
                            label: 2 months
                            ord: 5
                        3_months:
                            label: 3 months
                            ord: 6
                        6_months:
                            label: 6 months
                            ord: 7
                        9_months:
                            label: 9 months
                            ord: 8
                        1_year:
                            label: 1 year
                            ord: 9
                    empty_value: "-- Select --"
                    value: ''
                    format_onchange: true
                    side_note: If a user hasn't logged in to the site in the period selected, an email will be sent.
                inactive_user_email_template_1:
                    site_setting:
                        name: inactive_user_email_template_1
                    label: 'Email template:'
                    indent: 1
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        disallow_refiners_looping_on_min_path: Yes
                        nothing_selected_phrase: No email template selected
                        select_phrase: Select an email template...
                time_user_inactive_2:
                    site_setting:
                        name: time_user_inactive_2
                    label: 'Select user inactivity period:'
                    type: select
                    values:
                        2_weeks:
                            label: 2 weeks
                            ord: 1
                        3_weeks:
                            label: 3 weeks
                            ord: 2
                        4_weeks:
                            label: 4 weeks
                            ord: 3
                        6_weeks:
                            label: 6 weeks
                            ord: 4
                        2_months:
                            label: 2 months
                            ord: 5
                        3_months:
                            label: 3 months
                            ord: 6
                        6_months:
                            label: 6 months
                            ord: 7
                        9_months:
                            label: 9 months
                            ord: 8
                        1_year:
                            label: 1 year
                            ord: 9
                    empty_value: "-- Select --"
                    value: ''
                    format_onchange: true
                    side_note: If a user hasn't logged in to the site in the period selected, an email will be sent.
                inactive_user_email_template_2:
                    site_setting:
                        name: inactive_user_email_template_2
                    label: 'Email template:'
                    indent: 1
                    pick_items:
                        path: zenario__email_template_manager/panels/email_templates
                        target_path: zenario__email_template_manager/panels/email_templates
                        min_path: zenario__email_template_manager/panels/email_templates
                        max_path: zenario__email_template_manager/panels/email_templates
                        disallow_refiners_looping_on_min_path: Yes
                        nothing_selected_phrase: No email template selected
                        select_phrase: Select an email template...
                user_dataset_field_to_receive_emails: 
                    label: 'Only send if user dataset field checked:'
                    site_setting: 
                        name: user_dataset_field_to_receive_emails
                    type: select
                    empty_value: '-- Select --'
                    value: ""

