site_settings:
    setting_group: zenario_user_forms__site_settings_group
    title: |
        Editing settings for Forms and CRM integration
    tabs:
        zenario_user_forms_emails:
            label: Details
            edit_mode:
                enabled: Yes
            fields:
                site_settings:
                    type: grouping
                file_size:
                    type: grouping
                    snippet:
                        label: "Maximum file size for form attachments:"
                        label_class: subheading
                data_protection_link:
                    grouping: site_settings
                    snippet:
                        html: ''
                zenario_user_forms_enable_predefined_text:
                    grouping: site_settings
                    site_setting:
                        name: zenario_user_forms_enable_predefined_text
                    label: 'Enable pre-defined text'
                    type: checkbox
                    side_note: |
                        Textareas in a form can have text pre-defined. The text is stored next to other fields. When a button next to the textarea is clicked by a visitor, the other fields are evaluated and if they have been checked the respective text is added to the textarea.
                zenario_user_forms_max_attachment_file_size_override:
                    grouping: file_size
                    site_setting:
                        name: zenario_user_forms_max_attachment_file_size_override
                    label: "Restrict uploads to..."
                    type: checkbox
                    value: false
                    redraw_onchange: true
                zenario_user_forms_content_max_filesize:
                    grouping: file_size
                    indent: 1
                    site_setting:
                        name: zenario_user_forms_content_max_filesize
                    label: 'User Forms maximum file size:'
                    type: text
                    value: 8
                    validation:
                        required_if_not_hidden: Please enter a maximum content file size.
                        numeric: Must be numeric.
                    decimal_places: ""
                    visible_if: lib.value('zenario_user_forms_max_attachment_file_size_override')
                    maxlength: 10
                    style: "width: 7em;"
                zenario_user_forms_content_max_filesize_unit:
                    grouping: file_size
                    indent: 1
                    site_setting:
                        name: zenario_user_forms_content_max_filesize_unit
                    label: 'Unit:'
                    same_row: true
                    type: select
                    values:
                        KB:
                            label: KB
                        MB:
                            label: MB
                        GB:
                            label: GB
                    value: MB
                    redraw_onchange: true
                    visible_if: lib.value('zenario_user_forms_max_attachment_file_size_override')
                global_upload_setting_info:
                    grouping: file_size
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">
                                [[global_upload_setting_string]]
                            </div>
        zenario_user_forms_profanity_filter:
            label:  Profanity filter
            edit_mode:
                enabled: Yes
            fields:
                zenario_user_forms_profanity_filter_info:
                    snippet:
                        html: |
                            <p>
                                Zenario can scan text and textarea fields on forms for swear words and prevent emailing form responses if a form response exceeds the tolerance level.
                                The feature requires a .csv file with a list of profanities to be present on the server.
                            </p>
                            <p>The file must be called <code>profanities.csv</code> and must be in the directory <code>zenario/libs/not_to_redistribute/profanity-filter/</code>.</p>
                zenario_user_forms_set_profanity_filter:
                    site_setting:
                        name: zenario_user_forms_set_profanity_filter
                    label: 'Enable profanity filtering'
                    row_class: sub_field
                    type: checkbox
                    note_below: |
                        Must be enabled on each specific form using the "Filter for profanities" option. Blocked forms will be logged, but not emailed.
                    format_onchange: true
                    notices_below:
                        profanities_csv_file_is_missing:
                            hidden: true
                            type: warning
                            html: true
                            message: 'The file <code>zenario/libs/not_to_redistribute/profanity-filter/profanities.csv</code> could not be found. Zenario will not scan for swear words without this file.'
                            
                zenario_user_forms_set_profanity_tolerence:
                    indent: 1
                    site_setting:
                        name: zenario_user_forms_set_profanity_tolerence
                    label: 'Tolerance level:'
                    type: select
                    values:
                        5:
                            ord: 1
                            label: Low (blocks most forms with profanities)
                        10:
                            ord: 2
                            label: Medium
                        15:
                            ord: 3
                            label: High (blocks only the worst profanities)
                    value: 5
                    visible_if: |
                        zenarioAB.value('zenario_user_forms_set_profanity_filter')