# You must use a tab-size of 4 spaces to edit this file.
---
plugin_settings:
    module_class_name: zenario_extranet
    tabs:
        first_tab:
            label: Login
            fields:
                login_with:
                    plugin_setting:
                        name: login_with
                    label: 'Login with:'
                    type: radios
                    values:
                        Email:
                            label: Email
                        Screen_Name:
                            label: >
                                Screen Name (requires the "user_use_screen_name" site
                                setting enabled)
                    value: Email
                show_title:
                    plugin_setting:
                        name: show_title
                    type: checkbox
                    value: true
                    label: 'Show title'
                    redraw_onchange: true
                title:
                    indent: 1
                    plugin_setting:
                        name: title
                    type: text
                    label: 'Enter title:'
                    value: 'Sign in'
                    visible_if: lib.value('show_title')
                    validation:
                        required_if_not_hidden: 'Please enter the title.'
                title_tags:
                    plugin_setting:
                        name: title_tags
                    label: 'Title heading tags'
                    type: select
                    values:
                        h1: <h1>
                        h2: <h2>
                        h3: <h3>
                        h4: <h4>
                        h5: <h5>
                        h6: <h6>
                        p: <p>
                    value: h2
                    visible_if: lib.value('show_title')
                    same_row: true
                use_captcha:
                    plugin_setting:
                        name: use_captcha
                    label: 'Show a captcha'
                    type: checkbox
                    redraw_onchange: true
                    side_note: >
                        Require completion of a captcha to ensure we're dealing with a human.
                captcha_frequency:
                    indent: 1
                    plugin_setting:
                        name: captcha_frequency
                    label: 'Show:'
                    type: select
                    value: always
                    values:
                        always:
                            ord: 1
                            label: "Always"
                        after_1_failed_login_attempt:
                            ord: 2
                            label: "After 1 failed login attempt"
                        after_2_failed_login_attempts:
                            ord: 3
                            label: "After 2 failed login attempts"
                        after_3_failed_login_attempts:
                            ord: 4
                            label: "After 3 failed login attempts"
                    visible_if: lib.value('use_captcha')
                enable_remember_me:
                    plugin_setting:
                        name: enable_remember_me
                    label: |
                        Offer to remember user's email address or screen name in a cookie
                    type: checkbox
                    value: "1"
                    side_note: Allow user to have their email or screen name stored using a COOKIE_LAST_EXTRANET cookie.
                enable_log_me_in:
                    plugin_setting:
                        name: enable_log_me_in
                    label: |
                        Offer easy login to users by using a cookie
                    type: checkbox
                    value: ""
                    side_note: >
                        Allow user to stay logged in using a z_extranet_auto_login cookie until they
                        manually log out.
                                
                show_link_to_password_reset_page:
                    plugin_setting:
                        name: show_link_to_password_reset_page
                    label: |
                        Before login, show link to "password reset" special page
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                password_reset_page:
                    visible_if: zenarioAB.value('show_link_to_password_reset_page')
                    plugin_setting:
                        foreign_key_to: content
                    label: 'Password reset page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    readonly: true
                    indent: 1
                
                show_link_to_registration_page:
                    plugin_setting:
                        name: show_link_to_registration_page
                    label: |
                        Before login, show link to "register" special page
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                registration_page:
                    visible_if: zenarioAB.value('show_link_to_registration_page')
                    plugin_setting:
                        name: registration_page
                        foreign_key_to: content
                    label: 'Registration page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    validation:
                        required_if_not_hidden: Please select a registration page
                    indent: 1
                
                show_link_to_profile_page:
                    plugin_setting:
                        name: show_link_to_profile_page
                    label: |
                        After login, show link to "profile" special page
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                profile_page:
                    visible_if: zenarioAB.value('show_link_to_profile_page')
                    plugin_setting:
                        foreign_key_to: content
                    label: 'Profile page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    readonly: true
                    indent: 1
                
                show_link_to_change_password_page:
                    plugin_setting:
                        name: show_link_to_change_password_page
                    label: |
                        After login, show link to "change password" special page
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                change_password_page:
                    visible_if: zenarioAB.value('show_link_to_change_password_page')
                    plugin_setting:
                        foreign_key_to: content
                    label: 'Change password page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    readonly: true
                    indent: 1
                
                show_link_to_logout_page:
                    plugin_setting:
                        name: show_link_to_logout_page
                    label: |
                        After login, show link to "logout" special page
                    type: checkbox
                    value: 1
                    redraw_onchange: true
                logout_page:
                    visible_if: zenarioAB.value('show_link_to_logout_page')
                    plugin_setting:
                        foreign_key_to: content
                    label: 'Logout page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    readonly: true
                    indent: 1
                
                 
                redirect_to_login_page_on_submit:
                    plugin_setting:
                        name: redirect_to_login_page_on_submit
                    label: |
                        Redirect to the "login" special page after submit
                    type: checkbox
                    value: 1
                    side_note: >
                        This setting does nothing if the plugin is already on the login special page.
                
                requires_terms_and_conditions:
                    plugin_setting:
                        name: requires_terms_and_conditions
                    label: 'Require terms and conditions to be accepted'
                    type: select
                    value: ""
                    values:
                        0:
                            label: "Not required"
                        1:
                            label: "If user has not accepted T's and C's before"
                        always:
                            label: "User must accept T's and C's every time they login (even if accepted previously)"
                    format_onchange: Yes
                    side_note: >
                        Refers to terms_and_conditions_accepted flag in Users dataset.
                        If the user has not accepted the terms and conditions the
                        login will fail and the user will see an additional checkbox
                        asking them to accept the T's and C's.
                link_type:
                    plugin_setting:
                        name: link_type
                    label: 'Destination:'
                    type: select
                    value: _CONTENT_ITEM
                    visible_if: "zenarioAB.value('requires_terms_and_conditions')"
                    values:
                        _CONTENT_ITEM:
                            label: Link to a content item
                        _EXTERNAL_URL:
                            label: Link to an external URL
                    format_onchange: true
                    indent: 1
                terms_and_conditions_page:
                    plugin_setting:
                        name: terms_and_conditions_page
                        foreign_key_to: content
                    label: 'Terms and conditions page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    validation:
                        required_if_not_hidden: Please select a terms and conditions page
                    side_note: >
                        A link to this page will be placed in the "Accept our terms and conditions" checkbox text.
                    indent: 2
                    visible_if: "zenarioAB.value('link_type') != '_EXTERNAL_URL' && zenarioAB.value('requires_terms_and_conditions')"
                    note_below: "Always opens in a new window."
                url:
                    indent: 2
                    plugin_setting:
                        name: url
                        foreign_key_to: content
                    label: 'External URL:'
                    type: url
                    maxlength: "255"
                    value: ""
                    visible_if: "zenarioAB.value('link_type') == '_EXTERNAL_URL' && zenarioAB.value('requires_terms_and_conditions')"
                    validation:
                        required_if_not_hidden: "Please enter a URL."
                    note_below: "Always opens in a new window."
                
        action_after_login:
            label: Action after login
            fields:
                description:
                    full_width: Yes
                    snippet:
                        html: >
                            These settings control what happens after an Extranet User
                            logs in.
                show_welcome_page:
                    plugin_setting:
                        name: show_welcome_page
                    type: radios
                    value: _NEVER
                    values:
                        _NEVER:
                            ord: 1
                            label: >
                                Redirect to requested private content item, or else to the
                                previous page viewed
                        _ALWAYS:
                            ord: 2
                            label: Redirect based on rules below
                        _IF_NO_PREVIOUS_PAGE:
                            ord: 3
                            label: >
                                Redirect based on rules below (but if user requested a private content item other than home, this will take precedence)
                    format_onchange: Yes
                
                rules:
                    type: grouping
                    visible_if: zenarioAB.value('show_welcome_page') != '_NEVER'
                
                number_of_redirect_rules:
                    grouping: rules
                    plugin_setting:
                        name: number_of_redirect_rules
                    type: hidden
                    
                add_redirect_rule:
                    grouping: rules
                    indent: 1
                    ord: 999999998
                    type: submit
                    value: '+ Add a redirect rule'
                
                welcome_page:
                    grouping: rules
                    indent: 1
                    ord: 999999999
                    plugin_setting:
                        name: welcome_page
                        foreign_key_to: content
                    label: 'Default redirect page:'
                    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
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select a content item...
                        hide_remove_button: true
                    validation:
                        required_if_not_hidden: >
                            Please select a default redirect page
                    side_note: "If the above rules are not met, redirect to the page selected here (e.g. user welcome page, or profile)."
            
            #Fields for redirect rules (multi-row)
            redirect_rule_template_fields:
                redirect_div_start__znz:
                    <div id="field__znz">:
                    type: text
                    grouping: rules
                    show_as_a_span: true
                
                redirect_rule_type__znz:
                    indent: 2
                    plugin_setting:
                        name: redirect_rule_type__znz
                    label: 'Redirect rule znz:'
                    type: select
                    grouping: rules
                    empty_value: -- Select --
                    values:
                        group:
                            label: Group
                        role:
                            label: Role
                    redraw_onchange: true
                    validation:
                        required_if_not_hidden: Please select a redirect rule type.
                
                remove__znz:
                    same_row: true
                    type: submit
                    grouping: rules
                    value: 'Delete'
                
                in_group_label__znz:
                    indent: 3
                    grouping: rules
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'group'
                    snippet:
                        label: 'If the user is in the group'
                
                redirect_rule_group__znz:
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'group'
                    plugin_setting:
                        name: redirect_rule_group__znz
                    same_row: true
                    type: select
                    grouping: rules
                    empty_value: -- Select --
                    values: groups
                    validation:
                        required_if_not_hidden: Please select a group.
                
                in_group_redirect_label__znz:
                    grouping: rules
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'group'
                    same_row: true
                    snippet:
                        label: 'then redirect to...'
                
                has_role_label__znz:
                    indent: 3
                    grouping: rules
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'role'
                    snippet:
                        label: 'If the user has the role'
                    
                redirect_rule_role__znz:
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'role'
                    plugin_setting:
                        name: redirect_rule_role__znz
                    same_row: true
                    type: select
                    grouping: rules
                    empty_value: -- Select --
                    values: roles
                    validation:
                        required_if_not_hidden: Please select a role.
                
                has_role_redirect_label__znz:
                    visible_if: zenarioAB.value('redirect_rule_type__znz') == 'role'
                    same_row: true
                    grouping: rules
                    snippet:
                        label: 'at any location then redirect to...'
                
                redirect_rule_content_item__znz:
                    indent: 3
                    grouping: rules
                    visible_if: zenarioAB.value('redirect_rule_type__znz')
                    plugin_setting:
                        name: redirect_rule_content_item__znz
                    pick_items:
                        path: zenario__content/panels/content/refiners/content_type//html//
                        min_path: zenario__content/panels/content
                        target_path: zenario__content/panels/content
                        disallow_refiners_looping_on_min_path: true
                        select_phrase: Select content item...
                    validation:
                        required_if_not_hidden: Please select a content item.
                
                redirect_div_end__znz:
                    </div>:
                    type: text
                    grouping: rules
                    show_as_a_span: true
                
        error_messages:
            label: Error phrases
            notices:
                warn_about_email_enumeration:
                    show: true
                    type: warning
                    visible_if: |
                        lib.value('login_with', 'first_tab') == 'Email' && (
                            $.trim(lib.value('wrong_password_message')) != $.trim(lib.value('email_not_in_db_message'))
                         || $.trim(lib.value('wrong_password_message')) != $.trim(lib.value('contact_not_extranet_message'))
                        )
                    message: >
                        The message when an email address is recognised is different from when it's unknown (or a contact);
                        a hacker could figure out if an account exists.
                        For better security, use the same phrase in those three cases.
                warn_about_screen_name_enumeration:
                    show: true
                    type: warning
                    visible_if: |
                        lib.value('login_with', 'first_tab') == 'Screen_Name' &&
                        $.trim(lib.value('wrong_password_message')) != $.trim(lib.value('screen_name_not_in_db_message'))
                    message: >
                        The message when an email address is recognised is different from when it's unknown;
                        a hacker could figure out if an account exists.
                        For better security, use the same phrase in both cases.
            fields:
                description:
                    full_width: Yes
                    snippet:
                        html: >
                            The following messages may appear when the user tries to log in, edit them to customise.
                email_not_in_db_message:
                    plugin_setting:
                        name: email_not_in_db_message
                    label: 'Email address was not registered:'
                    type: text
                    value: "Your login details are not associated with any account, or the password is incorrect."
                    show_phrase_icon: true
                    redraw_onchange: true
                screen_name_not_in_db_message:
                    plugin_setting:
                        name: screen_name_not_in_db_message
                    label: 'Screen name was not registered:'
                    type: text
                    value: "Your login details are not associated with any account, or the password is incorrect."
                    show_phrase_icon: true
                    redraw_onchange: true
                contact_not_extranet_message:
                    plugin_setting:
                        name: contact_not_extranet_message
                    label: 'Account is a contact, not an extranet user:'
                    type: text
                    value: "Your login details are not associated with any account, or the password is incorrect."
                    show_phrase_icon: true
                    redraw_onchange: true
                email_address_required_error_text:
                    plugin_setting:
                        name: email_address_required_error_text
                    label: 'No email address was entered:'
                    type: text
                    value: "Please enter your email address."
                    show_phrase_icon: true
                screen_name_required_error_text:
                    plugin_setting:
                        name: screen_name_required_error_text
                    label: 'No screen name was entered:'
                    type: text
                    value: "Please enter your screen name."
                    show_phrase_icon: true
                password_required_error_text:
                    plugin_setting:
                        name: password_required_error_text
                    label: 'No password was entered:'
                    type: text
                    value: "Please enter your password."
                    show_phrase_icon: true
                invalid_email_error_text:
                    plugin_setting:
                        name: invalid_email_error_text
                    label: 'Email was not entered in a vaild format:'
                    type: text
                    value: "Your email address didn't appear to be in a valid format."
                    show_phrase_icon: true
                wrong_password_message:
                    plugin_setting:
                        name: wrong_password_message
                    label: 'Email address was registered but password was incorrect:'
                    type: text
                    value: "Your login details are not associated with any account, or the password is incorrect."
                    show_phrase_icon: true
                    redraw_onchange: true
                password_expired_message:
                    plugin_setting:
                        name: password_expired_message
                    label: 'Temporary password has expired:'
                    type: text
                    value: "Your temporary password has expired. You will need to reset your password before you can log in."
                    show_phrase_icon: true
                account_suspended_message:
                    plugin_setting:
                        name: account_suspended_message
                    label: 'User account is suspended:'
                    type: text
                    value: "Your account is suspended. Please contact the site administrator for assistance."
                    show_phrase_icon: true
                account_pending_message:
                    plugin_setting:
                        name: account_pending_message
                    label: 'User account is pending (email address has been verified, but account needs activation by adminstrator):'
                    type: text
                    value: "Your account has not yet been activated by the site administator. Please contact us for further assistance."
                    show_phrase_icon: true
                account_not_verified_message:
                    plugin_setting:
                        name: account_not_verified_message
                    label: 'User account is pending but email address not verified:'
                    type: text
                    value: "It looks like you have not yet verified your email address. If you have not received a verification email, please <a [[resend_verification_email]]>click here to have this site send you a new verification email</a>."
                    show_phrase_icon: true
                accept_terms_and_conditions_message:
                    plugin_setting:
                        name: accept_terms_and_conditions_message
                    label: "User hasn't accepted terms and conditions:"
                    type: text
                    value: "It looks like you have not yet accepted our terms and conditions, please accept these to continue using our site."
                    show_phrase_icon: true
                
                
                sub_description:
                    full_width: Yes
                    snippet:
                        html: "Error messages while changing password:"
                
                no_new_password_error_text:
                    plugin_setting:
                        name: no_new_password_error_text
                    label: 'A new password was not entered:'
                    type: text
                    value: "Please enter new password."
                    show_phrase_icon: true
                no_new_repeat_password_error_text:
                    plugin_setting:
                        name: no_new_repeat_password_error_text
                    label: 'The repeat password was not entered:'
                    type: text
                    value: "Please repeat your new password."
                    show_phrase_icon: true
                new_passwords_do_not_match:
                    plugin_setting:
                        name: new_passwords_do_not_match
                        dont_save_default_value: true
                    label: 'New password and repeat do not match:'
                    type: text
                    value: "The passwords you entered do not match."
                    show_phrase_icon: true
                new_password_length_message:
                    plugin_setting:
                        name: new_password_length_message
                        dont_save_default_value: true
                    label: 'New password not long enough:'
                    type: text
                    value: "Please ensure that your new password is at least [[min_password_length]] characters long."
                    show_phrase_icon: true
                new_password_not_strong_enough_message:
                    plugin_setting:
                        name: new_password_not_strong_enough_message
                        dont_save_default_value: true
                    label: 'New password not strong enough:'
                    type: text
                    value: "The new password provided is not strong enough. Please make the password longer, or try mixing in upper and lower case letters, numbers or non-alphanumeric characters."
                    show_phrase_icon: true
                new_password_same_as_old_message:
                    plugin_setting:
                        name: new_password_same_as_old_message
                        dont_save_default_value: true
                    label: 'New password same as old password:'
                    type: text
                    value: "Your new password is the same as your old password."
                    show_phrase_icon: true
    lovs:
        groups: {}
        roles: {}
