# You must use a tab-size of 4 spaces to edit this file.
---
plugin_settings:
    module_class_name: zenario_location_viewer
    tabs:
        first_tab:
            label: Settings
            fields:
                location_source_mode:
                    plugin_setting:
                        name: location_source_mode
                    label: 'Location source mode:'
                    type: radios
                    format_onchange: true
                    values:
                        location_from_selector:
                            label: "Auto"
                            ord: 1
                            side_note: |
                                When placed on a content item that is a descriptive page for a specific location, display the images of that location.
                        location_from_organizer:
                            label: "Specific location"
                            ord: 2
                            side_note: |
                                Select a location from Organizer and display its images.
                        location_from_url:
                            label: "Get location from URL"
                            ord: 3
                            side_note: |
                                If the URL contains the parameter l_id, use its value to get the ID of the location.
                    value: location_from_selector
                
                use_custom_url_request:
                    visible_if: "zenarioAB.value('location_source_mode') == 'location_from_url'"
                    plugin_setting:
                        name: use_custom_url_request
                    label: 'Use custom URL request'
                    type: checkbox
                    indent: 1
                    format_onchange: true
                url_request:
                    visible_if: "zenarioAB.value('location_source_mode') == 'location_from_url' && zenarioAB.value('use_custom_url_request')"
                    plugin_setting:
                        name: url_request
                    label: 'URL request:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a URL request.
                    value: "l_id"
                    maxlength: "255"
                    style: 'width: 7em;'
                    indent: 2
                
                location:
                    label: 'Other Location:'
                    plugin_setting:
                        name: location
                    pick_items:
                        path: zenario__locations/panel
                        target_path: zenario__locations/panel
                        min_path: zenario__locations/panel
                        max_path: zenario__locations/panel
                        select_phrase: Select Location...
                        nothing_selected_phrase: No Location selected
                    validation:
                        required_if_not_hidden: You must select a location
                    indent: 1
                    format_onchange: true
                location_user:
                    plugin_setting:
                        name: location_user
                    label: 'You must be an externet user and have a role at the location to see details'
                    type: checkbox
                    indent: 1
                
                use_location_name_for_page_title:
                    plugin_setting:
                        name: use_location_name_for_page_title
                    label: 'Use location name for page title'
                    type: checkbox
                    
                show_title:
                    plugin_setting:
                        name: show_title
                    label: 'Show location name'
                    type: checkbox
                show_details:
                    plugin_setting:
                        name: show_details
                    label: 'Show location details'
                    type: checkbox
                    value: 1
                    format_onchange: true
                    side_note: |
                        Displays a location's details as defined in the framework.
                show_address:
                    plugin_setting:
                        name: show_address
                    label: 'Show address lines 1-2'
                    type: checkbox
                    value: 1
                    indent: 1
                show_locality:
                    plugin_setting:
                        name: show_locality
                    label: 'Show locality'
                    type: checkbox
                    value: 1
                    indent: 1
                show_city:
                    plugin_setting:
                        name: show_city
                    label: 'Show city'
                    type: checkbox
                    value: 1
                    indent: 1
                show_state:
                    plugin_setting:
                        name: show_state
                    label: 'Show state'
                    type: checkbox
                    value: 1
                    indent: 1
                show_postcode:
                    plugin_setting:
                        name: show_postcode
                    label: 'Show postcode'
                    type: checkbox
                    value: 1
                    indent: 1
                show_country:
                    plugin_setting:
                        name: show_country
                    label: 'Show country name'
                    type: checkbox
                    value: 1
                    indent: 1
                show_region:
                    plugin_setting:
                        name: show_region
                    label: 'Show region'
                    type: checkbox
                    value: 1
                    indent: 1
                show_image:
                    plugin_setting:
                        name: show_image
                    label: 'Show image'
                    type: checkbox
                    value: 1
                    format_onchange: true
                    side_note: |
                        If a location has any images associated with it, the first image will be displayed.
                    indent: 1
                max_location_image_width:
                    plugin_setting:
                        name: max_location_image_width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width.
                        numeric: The width must be a number.
                    value: "120"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                    indent: 2
                max_location_image_height:
                    plugin_setting:
                        name: max_location_image_height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height.
                        numeric: The height must be a number.
                    value: "120"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                    same_row: true
                    indent: 2
                show_map:
                    plugin_setting:
                        name: show_map
                    label: 'Show map'
                    type: checkbox
                    value: 1
                    format_onchange: true
                    
                map_width:
                    plugin_setting:
                        name: map_width
                    label: 'Width:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a width.
                        numeric: The width must be a number.
                    value: "500"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                    indent: 1
                map_height:
                    plugin_setting:
                        name: map_height
                    label: 'Height:'
                    type: text
                    validation:
                        required_if_not_hidden: Please enter a height.
                        numeric: The height must be a number.
                    value: "500"
                    maxlength: "5"
                    style: 'width: 5em;'
                    post_field_html: '&nbsp;pixels'
                    indent: 1
