# You must use a tab-size of 4 spaces to edit this file.
---
plugin_settings:
    module_class_name: zenario_location_map_and_listing_2
    tabs:
        first_tab:
            label: Filters
            fields:
                desc:
                    ord: 0
                    snippet:
                        html: |
                            This plugin will show a Google Map and a list of all of locations on your site. The site must have a valid Google Maps API key, and "Maps JavaScript API", "Maps JavaScript API" and "Geocoding API" enabled in Google Cloud. Only locations that are "active" and with a pin will be shown.
                front_end_features:
                    type: grouping
                    snippet:
                        label: Front-end features
                        label_class: subheading
                show_fields:
                    type: grouping
                    snippet:
                        label: Show fields
                        label_class: subheading
                filter_locations:
                    type: grouping
                    snippet:
                        label: Filter locations
                        label_class: subheading
                show_location_list:
                    grouping: front_end_features
                    label: Show location list
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: show_location_list
                show_map:
                    grouping: front_end_features
                    label: Show map
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: show_map
                locations__field__name:
                    grouping: show_fields
                    label: Name
                    type: checkbox
                    value: 1
                    readonly: true
                    plugin_setting:
                        name: locations__field__name
                locations__field__checkbox_selection:
                    grouping: show_fields
                    label: Checkbox selection
                    type: checkbox
                    value: 1
                    side_note: "Show which filter checkboxes this location has."
                    plugin_setting:
                        name: locations__field__checkbox_selection
                locations__field__address:
                    grouping: show_fields
                    label: Address
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__address
                locations__field__phone:
                    grouping: show_fields
                    label: Phone
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__phone
                locations__field__email:
                    grouping: show_fields
                    label: Email
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__email
                locations__field__website:
                    grouping: show_fields
                    label: Website
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__website
                locations__field__link_to_descriptive_page:
                    grouping: show_fields
                    label: Link to descriptive page
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__link_to_descriptive_page
                locations__field__summary:
                    grouping: show_fields
                    label: Summary (only appears on the list)
                    type: checkbox
                    value: 1
                    plugin_setting:
                        name: locations__field__summary
                locations__field__special_offers:
                    grouping: show_fields
                    label: Special offers
                    type: checkbox
                    value: 0
                    plugin_setting:
                        name: locations__field__special_offers
                
                display_custom_dataset_fields_on_the_frontend:
                    plugin_setting:
                        name: display_custom_dataset_fields_on_the_frontend
                    grouping: show_fields
                    label: 'Display custom fields on the front end:'
                    pick_items:
                        reorder_items: true
                        multiple_select: true
                        enable_type_ahead_search: true
                        path: zenario__administration/panels/custom_fields_hierarchy/refiners/dataset_id//
                        info_button_path: zenario__administration/panels/custom_datasets/item_buttons/edit_gui//
                        visible_if_for_all_selected_items: item.is_field
                        disallow_refiners_looping_on_min_path: true
                    note_below: |
                        Custom field data will appear on the location list and the map.
                        However, only checkbox-type fields will appear on the location list of filters.
                location_display:
                    grouping: filter_locations
                    plugin_setting:
                        name: location_display
                    type: radios
                    values:
                        show_all_locations:
                            ord: 1
                            label: "Show all locations, without visitor Filter control"
                        show_all_locations_with_filter:
                            ord: 2
                            label: "Show all locations, with visitor Filter control"
                        apply_a_filter:
                            ord: 3
                            label: "Apply a filter for initial results, with visitor Filter control"
                    value: show_all_locations
                    format_onchange: true
                location_dataset_filter_level_1:
                    grouping: filter_locations
                    label: "Filter locations (level 1):"
                    indent: 1
                    plugin_setting:
                        name: location_dataset_filter_level_1
                    type: select
                    values: {}
                    empty_value: '-- Select --'
                    visible_if: zenarioAB.value('location_display') == 'apply_a_filter'
                    format_onchange: true
                    validation:
                        required_if_not_hidden: "Please select a dataset field."
                no_location_level_1_filters_found:
                    grouping: filter_locations
                    hidden: true
                    indent: 1
                    snippet:
                        html: '<div class="zenario_fbWarning">No filters found.</div>'
                location_dataset_filter_level_2:
                    grouping: filter_locations
                    label: "Filter locations (level 2, optional):"
                    indent: 2
                    plugin_setting:
                        name: location_dataset_filter_level_2
                    type: select
                    values: {}
                    empty_value: '-- Select --'
                    visible_if: (zenarioAB.value('location_dataset_filter_level_1') && zenarioAB.value('location_display') == 'apply_a_filter')
                no_location_level_2_filters_found:
                    grouping: filter_locations
                    hidden: true
                    indent: 2
                    snippet:
                        html: '<div class="zenario_fbWarning">No filters found.</div>'
                exclude_dataset_filters:
                    grouping: filter_locations
                    label: "Exclude filters"
                    type: checkbox
                    value: false
                    plugin_setting:
                        name: exclude_dataset_filters
                    redraw_onchange: true
                exclude_dataset_filters_picker:
                    grouping: filter_locations
                    label: "Hide the following categorisations:"
                    indent: 1
                    plugin_setting:
                        name: exclude_dataset_filters_picker
                    type: checkboxes
                    values: {}
                    visible_if: zenarioAB.value('exclude_dataset_filters')
                    validation:
                        required_if_not_hidden: "Please select one or more dataset fields to exclude."
        display:
            label: "Display"
            fields:
                show_images:
                    plugin_setting:
                        name: show_images
                    type: checkbox
                    label: 'Show location images on the list and in map info boxes'
                    format_onchange: true
                image_canvas:
                    indent: 1
                    plugin_setting:
                        name: image_canvas
                    label: 'Show location thumbnail images at this size:'
                    side_note: "Set the size at which to show images in the list. On-map info boxes will use the same image at 50% of this size."
                    type: select
                    values:
                        fixed_width:
                            ord: "2"
                            label: Constrain by width
                        fixed_height:
                            ord: "3"
                            label: Constrain by height
                        fixed_width_and_height:
                            ord: "4"
                            label: Constrain by width and height
                        resize_and_crop:
                            ord: "5"
                            label: Resize and crop
                    value: fixed_width_and_height
                    format_onchange: true
                image_width:
                    indent: 3
                    plugin_setting:
                        name: image_width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width in pixels.
                        numeric: The width must be a number.
                    value: 240
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                image_height:
                    indent: 3
                    plugin_setting:
                        name: image_height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height in pixels.
                        numeric: The height must be a number.
                    value: 160
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                initial_map_position:
                    plugin_setting:
                        name: initial_map_position
                    label: 'Initial map position:'
                    type: radios
                    values:
                        auto_position_at_centre:
                            ord: 1
                            label: 'Auto-position at centre'
                        fixed_position:
                            ord: 2
                            label: 'Fixed position'
                    value: auto_position_at_centre
                    redraw_onchange: true
                    note_below: |
                        To ascertain latitude and longitude, go to Google Maps and read off the numbers in the URL.
                        e.g. <a href="https://www.google.co.uk/maps/@51.4570534,-0.9786634,14.74z" target="_blank">https://www.google.co.uk/maps/@51.4570534,-0.9786634,14.74z</a>
                fixed_position_lat:
                    plugin_setting:
                        name: fixed_position_lat
                    indent: 1
                    label: 'Latitude:'
                    visible_if: lib.value('initial_map_position') == 'fixed_position'
                    type: text
                    maxlength: "15"
                    style: 'width: 10em;'
                    validation:
                        required_if_not_hidden: "This field is required."
                        numeric: "Please enter a number."
                    side_note: 'Note: the plugin preview may not accurately reflect a change in camera position left. Please save and reload if changing camera position.'
                fixed_position_lng:
                    plugin_setting:
                        name: fixed_position_lng
                    indent: 1
                    label: 'Longitude:'
                    visible_if: lib.value('initial_map_position') == 'fixed_position'
                    type: text
                    maxlength: "15"
                    style: 'width: 10em;'
                    validation:
                        required_if_not_hidden: "This field is required."
                        numeric: "Please enter a number."
                    side_note: 'Note: the plugin preview may not accurately reflect a change in camera position left. Please save and reload if changing camera position.'
                zoom_control:
                    plugin_setting:
                        name: zoom_control
                    label: 'Zoom settings:'
                    type: radios
                    values:
                        auto_include_all_locations:
                            ord: 1
                            label: 'Auto-zoom to include all location pins'
                        set_manually:
                            ord: 2
                            label: 'Manually set a zoom level'
                    value: auto_include_all_locations
                    redraw_onchange: true
                    note_below: 'Use 1 for a world-level view, or any integer up to 25 for a close-up view. (Higher zoom levels may not be available, depending on the region or country)'
                zoom_level:
                    plugin_setting:
                        name: zoom_level
                    indent: 1
                    label: 'Zoom level:'
                    visible_if: lib.value('zoom_control') == 'set_manually'
                    type: text
                    maxlength: "5"
                    style: 'width: 5em;'
                    validation:
                        required_if_not_hidden: "This field is required."
                        numeric: "Please enter a number."
                    side_note: 'Note: the plugin preview may not accurately reflect a change in zoom left. Please save and reload if changing zoom level.'
