plugin_settings:
    module_class_name: zenario_copyright
    maxheight: 300
    tabs:
        first_tab:
            label: Details
            notices:
                caching_note:
                    show: false
                    type: warning
                    message: "Note: if the year is out of date, please press Save to update it to the current year."
            fields:
                company_name:
                    plugin_setting:
                        name: company_name
                    label: 'Company name:'
                    type: text
                    placeholder: 'Your company name'
                    maxlength: 255
                        
                year_display:
                    plugin_setting:
                        name: year_display
                    label: 'Year display:'
                    type: select
                    values:
                        do_not_display_year: 
                            label: "Don't display year"
                            ord: 1
                        display_single_year: 
                            label: 'Display a single year'
                            ord: 2
                        display_year_range: 
                            label: 'Display a year range'
                            ord: 3
                    empty_value: "-- Select --"
                    format_onchange: true
                    validation:
                        required: Please select an option for year display.
                        
                display_single_year:
                    visible_if: "zenarioAB.value('year_display') == 'display_single_year'"
                    plugin_setting:
                        name: display_single_year
                    label: 'Year display:'
                    type: radios
                    indent: 1
                    values:
                        current_year: 
                            label: "Current year"
                            ord: 1
                        specific_year: 
                            label: 'A specific year'
                            ord: 2
                    value: current_year
                    format_onchange: true
                    validation:
                        required_if_not_hidden: Please select an option for year display.
                    
                specific_year:
                    visible_if: "zenarioAB.value('display_single_year') == 'specific_year' && zenarioAB.value('year_display') == 'display_single_year'"
                    plugin_setting:
                        name: specific_year
                    label: 'Year:'
                    type: text
                    indent: 2
                    maxlength: 10
                    style: 'width: 5em;'
                    validation:
                        required_if_not_hidden: Please enter a specific year.
                        numeric: The year must be a number.
                        
                start_year:
                    visible_if: "zenarioAB.value('year_display') == 'display_year_range'"
                    plugin_setting:
                        name: start_year
                    label: 'Start year:'
                    type: text
                    maxlength: 10
                    indent: 1
                    style: 'width: 5em;'
                    validation:
                        required_if_not_hidden: Please enter a start year.
                        numeric: The height must be a number.
                        
                end_year_type:
                    visible_if: "zenarioAB.value('year_display') == 'display_year_range'"
                    plugin_setting:
                        name: end_year_type
                    label: 'End year:'
                    type: radios
                    indent: 1
                    values:
                        current_year: 
                            label: "Current year"
                            ord: 1
                        specific_year: 
                            label: 'Specific year'
                            ord: 2
                    format_onchange: true
                    value: current_year
                    validation:
                        required_if_not_hidden: Please select an option for year display.
                    
                end_year:
                    visible_if: "zenarioAB.value('end_year_type') == 'specific_year' && zenarioAB.value('year_display') == 'display_year_range'"
                    plugin_setting:
                        name: end_year
                    label: 'End year:'
                    type: text
                    indent: 2
                    maxlength: 10
                    style: 'width: 5em;'
                    validation:
                        required_if_not_hidden: Please enter an end year.
                        numeric: The end year must be a number.
                
                link_type:
                    plugin_setting:
                        name: link_type
                    label: 'Link'
                    type: radios
                    values:
                        no_link: 
                            label: 'No link'
                            ord: 1
                        external: 
                            label: 'Link to an external URL'
                            ord: 2
                        internal: 
                            label: 'Link to a content item'
                            ord: 3
                    value: no_link
                    format_onchange: true
                        

                
                # Format the picker slightly differently when selecting a translation chain v.s selecting a content item.
                # Note: these are cosmetic changes only, for backwards compatibility reasons the values in the database and logic in the
                # PHP code is still exactly the same as it was in Zenario 9.4.
                hyperlink_target__specific:
                    hidden: true
                    pick_items: &hyperlink_target__specific__pick_items
                        path: zenario__content/panels/content/refiners/filter_by_lang////
                        min_path: zenario__content/panels/content
                        max_path: zenario__content/panels/content
                        target_path: zenario__content/panels/content
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    validation: &hyperlink_target__specific__validation
                        required_if_not_hidden: Please select a content item
                hyperlink_target__translation:
                    hidden: true
                    pick_items:
                        path: zenario__content/panels/translation_chains
                        min_path: zenario__content/panels/translation_chains
                        max_path: zenario__content/panels/translation_chains
                        target_path: zenario__content/panels/translation_chains
                        select_phrase: Select a translation chain...
                        hide_remove_button: true
                    validation:
                        required_if_not_hidden: Please select a translation chain
                
                use_translation:
                    indent: 1
                    plugin_setting:
                        name: use_translation
                    type: radios
                    value: 0
                    values:
                        0:
                            ord: 1
                            label: 'Link to a content item in a specific language:'
                        1:
                            ord: 0
                            label: "Link to a translation in the visitor's language (recommended):"
                    format_onchange: true
                hyperlink_target:
                    visible_if: "zenarioAB.value('link_type') == 'internal'"
                    indent: 1
                    plugin_setting:
                        name: hyperlink_target
                        foreign_key_to: content
                    pick_items: *hyperlink_target__specific__pick_items
                    validation: *hyperlink_target__specific__validation
                    format_onchange: true
                    notices_below:
                        in_language:
                            hidden: true
                            type: information
                            message: ''
                        featured_image_filename:
                            hidden: true
                            type: ''
                            message: ''
                
                url:
                    visible_if: "zenarioAB.value('link_type') == 'external'"
                    plugin_setting:
                        name: url
                    label: 'External URL:'
                    indent: 1
                    type: url
                    maxlength: 255
                    value: ""
                    validation:
                        required_if_not_hidden: Please enter a URL.
                
                target_blank:
                    visible_if: "zenarioAB.value('link_type') == 'external'"
                    plugin_setting:
                        name: target_blank
                    label: 'Open in a new window'
                    indent: 1
                    type: checkbox
                    value: ""
