# You must use a tab-size of 4 spaces to edit this file.
---
zenario__administration:
    panels:
        custom_tabs_and_fields_gui:
            panel_type: admin_box_builder
            
            #This property will be populated in the PHP class.
            dataset: ''
            
            dataset_page_details:
                hide_tab_bar: true
                tabs:
                    details:
                        label: Details
                        fields:
                            label:
                                label: 'Label:'
                                type: text
                                maxlength: 255
                            tab_type:
                                label: 'Type:'
                                type: text
                                readonly: true
                                show_as_a_span: true
                            tab_code_name:
                                label: 'Code name:'
                                type: text
                                readonly: true
                                show_as_a_span: true
                            parent_field_id:
                                label: 'Conditional display on field:'
                                type: select
                                values: boolean_fields
                                empty_value: -- No conditional display --
                                visible_if: |
                                    !item.is_system_field 
                            sectors_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Warning: the Sectors tab will not appear, as sector management for locations is not set to "Quick sector management" in <a href='organizer.php#zenario__administration/panels/site_settings//zenario_location_manager__site_settings_group~.site_settings~tzenario_location_manager__site_settings~k{"id"%3A"zenario_location_manager__site_settings_group"}' target="_blank">site settings for Locations</a>.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'locations' && item.id == 'sectors' && item.tab_dependent_on_a_site_setting && !item.site_setting_enabled
            
            dataset_field_details:
                tabs:
                    details:
                        label: Details
                        fields:
                            message:
                                pre_field_html: <div class="info_message">
                                snippet:
                                    html: |
                                        This system field does not have a recognisable type so you cannot edit its details.
                                post_field_html: </div>
                                visible_if: |
                                    item.type == 'other_system_field'
                            screen_names_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Warning: screen names are not enabled in site settings. Please go to the <a href='organizer.php#zenario__administration/panels/site_settings//users~.site_settings~tnames~k{"id"%3A"users"}' target="_blank">Users and contacts</a> site setting to enable screen names.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'users' && (item.field_name == 'screen_name' || item.field_name == 'suggest_screen_name' || item.field_name == 'screen_name_confirmed') && item.field_dependent_on_a_site_setting && !item.site_setting_enabled
                            users_linked_countries_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>This will not appear when editing a user, please see <a href='organizer.php#zenario__administration/panels/site_settings//users~.site_settings~tnames~k{"id"%3A"users"}' target="_blank">Users and contacts</a> site setting to enable this feature.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'users' && item.field_name == 'user_supervised_smart_groups' && item.field_dependent_on_a_site_setting && !item.site_setting_enabled
                            user_supervised_smart_groups_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Warning: Country-based permissions are not enabled in site settings. Please go to the <a href='organizer.php#zenario__administration/panels/site_settings//users~.site_settings~tcountries~k{"id"%3A"users"}' target="_blank">Users and contacts</a> site setting to enable country-based permissions.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'users' && item.field_name == 'linked_countries' && item.field_dependent_on_a_site_setting && !item.site_setting_enabled
                            external_number_for_locations_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Warning: external number for locations is not enabled in site settings. Please go to the <a href='organizer.php#zenario__administration/panels/site_settings//zenario_location_manager__site_settings_group~.site_settings~tzenario_location_manager__site_settings~k{"id"%3A"zenario_location_manager__site_settings_group"}' target="_blank">Locations</a> site setting to enable it.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'locations' && item.field_name == 'external_id' && item.field_dependent_on_a_site_setting && !item.site_setting_enabled
                            external_number_for_organizations_site_setting_disabled:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Warning: external number for organizations is not enabled in site settings. Please go to the <a href='organizer.php#zenario__administration/panels/site_settings//zenario_location_manager__site_settings_group~.site_settings~tzenario_location_manager__site_settings~k{"id"%3A"zenario_location_manager__site_settings_group"}' target="_blank">Organizations</a> site setting to enable it.</p>
                                post_field_html: </div>
                                visible_if: |
                                    item.dataset == 'companies' && item.field_name == 'company_number' && item.field_dependent_on_a_site_setting && !item.site_setting_enabled
                            label:
                                label: 'Label:'
                                type: text
                                maxlength: 64
                                note_below: The text of the label that appears before the field.
                                visible_if: |
                                    item.type != 'other_system_field'
                            db_column:
                                label: 'Code name:'
                                type: text
                                maxlength: 64
                                note_below: This will be used for the name of the column in the database.
                                visible_if: |
                                    item.type != 'other_system_field' && (!item.is_system_field || item.db_column)
                            values_source:
                                label: 'Source:'
                                type: select
                                empty_value: -- Select --
                                values: centralised_lists
                                format_onchange: true
                                visible_if: |
                                    !item.is_system_field && (item.type == 'centralised_radios' || item.type == 'centralised_select')
                            values_source_filter:
                                label: ''
                                type: text
                                maxlength: 255
                                note_below: Set a filter for the source.
                                visible_if: |
                                    !item.is_system_field && (item.type == 'centralised_radios' || item.type == 'centralised_select') && item.values_source
                            
                            dataset_foreign_key_id:
                                label: 'Source:'
                                type: select
                                values: datasets
                                visible_if: |
                                    !item.is_system_field && (item.type == 'dataset_select' || item.type == 'dataset_picker')
                            is_protected:
                                label: Protected
                                type: checkbox
                                format_onchange: true
                                note_below: Fields critical to the working of user/admin interfaces should be protected.
                                visible_if: |
                                    item.type != 'other_system_field'
                                format_onchange: true
                            
                            protected_warning:
                                visible_if: |
                                    item.is_protected == 0 && item.was_protected
                                snippet:
                                    html: |
                                        <strong>Deleting or changing the code name of this field may break your site.</strong>
                            include_in_export:
                                label: Include in Excel/CSV export
                                type: checkbox
                                visible_if: |
                                    lib.tuix.show_include_in_export_option && ((item.type != 'other_system_field' && (item.db_column || item._just_added)) || item.allow_admin_to_change_export)
                            export_disabled:
                                label: Exporting country-based permissions is not available
                                type: checkbox
                                readonly: true
                                visible_if: |
                                    item.dataset == 'users' && item.field_dependent_on_a_site_setting
                            autocomplete:
                                label: Autocomplete
                                type: checkbox
                                note_below: Display a list below of all unique values for this field that you can choose from.
                                visible_if: |
                                    item.type == 'text'
                            multiple_select:
                                label: Allow multiple files
                                type: checkbox
                                visible_if: |
                                    item.type == 'file_picker'
                            store_file:
                                label: 'File storage:'
                                type: radios
                                values: 
                                    in_docstore:
                                        label: Docstore
                                    in_database:
                                        label: Database
                                visible_if: |
                                    item.type == 'file_picker'
                            extensions:
                                label: 'Allowed file types:'
                                type: text
                                note_below: Enter a comma seperated list of allowed file types (e.g. .png, .jpg, .jpeg, .gif). If left blank, all types will be allowed.
                                visible_if: |
                                    item.type == 'file_picker'
                            width:
                                label: 'Width of the field on the admin box:'
                                type: select
                                empty_value: -- Default width -- 
                                values:
                                    1:
                                        label: 1 character (em)
                                    5:
                                        label: 5 characters (em)
                                    10:
                                        label: 10 characters (em)
                                    25:
                                        label: 25 characters (em)
                                    40:
                                        label: 40 characters (em)
                                    56:
                                        label: 56 characters (em)
                                visible_if: |
                                    item.type == 'textarea'
                            height:
                                label: 'Height of the field on the admin box:'
                                type: select
                                empty_value: -- Default rows -- 
                                values:
                                    3:
                                        label: 3 rows
                                    5:
                                        label: 5 rows
                                    10:
                                        label: 10 rows
                                    20:
                                        label: 20 rows
                                visible_if: |
                                    item.type == 'editor' || item.type == 'textarea'
                            admin_box_visibility:
                                label: 'Visibility:'
                                type: select
                                values:
                                    show:
                                        label: Show
                                    show_on_condition:
                                        label: Show on condition
                                    hide:
                                        label: Hide
                                format_onchange: true
                                visible_if: |
                                    item.type != 'other_system_field' || item.tuix_type == 'pick_items'
                            parent_id:
                                label: 'Conditional display on field:'
                                type: select
                                empty_value: -- Select --
                                values: boolean_fields
                                visible_if: |
                                    (item.type != 'other_system_field' || item.tuix_type == 'pick_items') && item.admin_box_visibility == 'show_on_condition'
                                indent: 1
                                format_onchange: true
                                
                            note_below:
                                label: 'Note below:'
                                type: text
                                maxlength: 255
                                note_below: A message to administrators below the field.
                                visible_if: |
                                    item.type != 'other_system_field' && (item.is_system_field || (item.admin_box_visibility != 'hide'))
                            side_note:
                                label: 'Side note:'
                                type: text
                                maxlength: 255
                                note_below: A message to administrators that appears to the side when hovering over the field.
                                visible_if: |
                                    item.type != 'other_system_field' && (item.is_system_field || (item.admin_box_visibility != 'hide'))
                    validation:
                        label: Validation
                        visible_if: |
                            item.type != 'other_system_field'
                        fields:
                            message:
                                pre_field_html: <div class="info_message">
                                snippet:
                                    html: |
                                        You cannot change the validation of a system field.
                                post_field_html: </div>
                                visible_if: |
                                    item.is_system_field
                            
                            
                            
                            readonly_or_mandatory:
                                visible_if: |
                                    !item.is_system_field
                                label: 'Mandatory / Read-only:'
                                type: select
                                values:
                                    none:
                                        label: None
                                    mandatory:
                                        label: Mandatory
                                    #mandatory_all_values_required:
#                                        label: Mandatory (select all values)
                                    readonly:
                                        label: Read-only
                                    conditional_mandatory:
                                        label: Mandatory on condition
                                    mandatory_if_visible:
                                        label: Mandatory if visible
                                format_onchange: true
                                note_below: Choose whether this field is mandatory or read-only.
                            mandatory_setting_is_not_recommended_for_documents_dataset:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Not recommended: mandatory validation cannot be applied when creating a document, only when editing.</p>
                                post_field_html: </div>
                                visible_if: |
                                    lib.tuix.dataset.system_table == 'documents' && (item.readonly_or_mandatory == 'mandatory' || item.readonly_or_mandatory == 'conditional_mandatory' || item.readonly_or_mandatory == 'mandatory_if_visible')
                            mandatory_condition_field_id:
                                indent: 1
                                visible_if: |
                                   !item.is_system_field && item.readonly_or_mandatory == 'conditional_mandatory'
                                label: 'Mandatory on condition field:'
                                type: select
                                empty_value: -- Select --
                                values: conditional_fields
                                format_onchange: true
                                note_below: |
                                    Select a field that this field will rely on from the current form (the following types of field are allowed: checkbox, checkboxes, radios, select, centralised radios and centralised select)
                            mandatory_condition_field_type:
                                indent: 2
                                hide_with_previous_outdented_field: true
                                visible_if: |
                                    item.mandatory_condition_field_id
                                type: select
                                values:
                                    mandatory_if:
                                        label: Mandatory if...
                                    mandatory_if_not:
                                        label: Mandatory if not...
                                format_onchange: true
                            mandatory_condition_field_value:
                                indent: 2
                                hide_with_previous_outdented_field: true
                                visible_if: |
                                    item.mandatory_condition_field_id
                                type: select
                                empty_value: -- Select --
                                values:
                                    checked:
                                        label: Checked
                                    unchecked:
                                        label: Unchecked
                            mandatory_condition_checkboxes_operator:
                                indent: 2
                                hidden: true
                                type: select
                                values:
                                    AND:
                                        label: All options below are checked
                                    OR:
                                        label: Any option below is checked
                            mandatory_condition_checkboxes_field_value:
                                indent: 2
                                hide_with_previous_outdented_field: true
                                visible_if: |
                                    item.mandatory_condition_field_id
                                type: checkboxes
                                values: field_lov
                            required_message:
                                indent: 1
                                visible_if: |
                                    !item.is_system_field && ['mandatory', 'conditional_mandatory', 'mandatory_if_visible'].indexOf(item.readonly_or_mandatory) != -1
                                label: 'Error message when field is incomplete:'
                                type: text
                                maxlength: 250
                                value: This field is required.
                                note_below: Enter an error message when this field is incomplete.
                                is_phrase: true
                            
                            
                            
                            
                            
                            
                            
                            validation:
                                label: 'Validation:'
                                type: radios
                                value: none
                                values:
                                    none:
                                        label: 'None'
                                    email:
                                        label: 'Email'
                                    emails:
                                        label: 'Multiple emails'
                                    no_spaces:
                                        label: 'No spaces allowed'
                                    numeric:
                                        label: 'Numeric'
                                    screen_name:
                                        label: 'Screen name'
                                format_onchange: true
                                note_below: An administrator will not be able to save a record if this field does not match the validation rule chosen.
                                visible_if: |
                                     !item.is_system_field && item.type == 'text'
                            field_validation_is_not_recommended_for_documents_dataset:
                                pre_field_html: <div class="dataset_warning">
                                snippet:
                                    html: |
                                        <p>Not recommended: field validation cannot be applied when creating a document, only when editing.</p>
                                post_field_html: </div>
                                visible_if: |
                                    lib.tuix.dataset.system_table == 'documents' && (item.validation != 'none')
                            validation_message:
                                label: 'Message if not valid:'
                                type: text
                                maxlength: 255
                                visible_if: |
                                    !item.is_system_field && item.type == 'text' && item.validation && item.validation != 'none'
                                indent: 1
                    organizer:
                        label: Organizer
                        visible_if: |
                            item.type != 'other_system_field'
                        fields:
                            show_in_organizer:
                                label: Show in Organizer panel
                                type: checkbox
                                format_onchange: true
                                visible_if: |
                                    !item.is_system_field
                            create_index:
                                type: radios
                                values:
                                    no_index: 
                                        label: Don't index
                                    index:
                                        label: Index
                                value: index
                                format_onchange: true
                                visible_if: |
                                    !item.is_system_field && item.show_in_organizer && (['editor', 'file_picker', 'checkboxes'].indexOf(item.type) == -1)
                                indent: 1
                            searchable:
                                label: Allow quick-searching in Organizer
                                type: checkbox
                                visible_if: |
                                    !item.is_system_field && item.type == 'text' && item.show_in_organizer && item.create_index == 'index'
                                indent: 2
                            filterable:
                                label: Allow filtering in Organizer
                                type: checkbox
                                visible_if: |
                                    !item.is_system_field && ((['date', 'text', 'textarea', 'url'].indexOf(item.type) != -1) ? item.show_in_organizer : (item.show_in_organizer && item.create_index == 'index'))
                                indent: 2
                            sortable:
                                label: Allow sorting in Organizer
                                type: checkbox
                                visible_if: |
                                    !item.is_system_field && item.show_in_organizer && (item.create_index == 'index') && (['editor', 'checkboxes', 'radios', 'centralised_radios', 'select', 'centralised_select'].indexOf(item.type) == -1)
                                indent: 2
                            organizer_visibility:
                                label: 'Visibility:'
                                type: select
                                values:
                                    hide:
                                        label: 'Hide by default'
                                    show_by_default:
                                        label: 'Show by default'
                                    always_show:
                                        label: 'Always show'
                                visible_if: |
                                    !item.is_system_field && item.show_in_organizer && (['editor', 'file_picker'].indexOf(item.type) == -1)
                                indent: 1
                            hide_in_organizer:
                                label: Hide in Organizer panel
                                type: checkbox
                                visible_if: |
                                    item.is_system_field
                                
                    values:
                        visible_if: |
                            ['select', 'radios', 'checkboxes', 'centralised_radios', 'centralised_select'].indexOf(item.type) != -1
                        label: Values
                        fields:
                            message:
                                pre_field_html: <div class="info_message">
                                snippet:
                                    html: |
                                        You cannot change the values of a system field.
                                post_field_html: </div>
                                visible_if: |
                                    item.is_system_field || (item.type == 'centralised_radios' || item.type == 'centralised_select')
                            values:
                                type: values_list
                                visible_if: |
                                    !item.is_system_field && !(item.type == 'centralised_radios' || item.type == 'centralised_select')
                                    
                                
