passwords:
    kind: panel.form
    name: passwords
    label: Passwords
    method: POST
    url: /xapi/siteConfig
    contentType: json
    contents:
        passwordComplexity:
            kind: panel.input.text
            name: passwordComplexity
            label: Password Complexity
            description: Must be a valid regular expression. Do not include bounding '/' characters.
            validation: "!pattern:^/"
            element:
                data:
                    message: Please do not include bounding "/" characters in your regex pattern.
        passwordComplexityMessage:
            kind: panel.textarea
            name: passwordComplexityMessage
            label: Password Complexity Message
            code: html
        passwordExpiration:
            kind: panel.element
            label: Password Expiration
            info: >
                <p>A <b>password expiration interval</b> specifies the length of time users have before they must change their passwords (Specified in <a target="_blank" href="http://www.postgresql.org/docs/9.0/static/functions-datetime.html">PostgreSQL interval notation</a>).</p><p>Alternatively, a <b>password expiration date</b> can be configured to expire passwords that were last changed before it. This is useful for purging access to obsolete accounts.</p>
            contents:
                info:
                    tag: p
                    element:
                        style: "margin: 3px 0 8px 0;"
                    content: Select a password expiration type below
                passwordExpirationTypeDisabled:
                    kind: input.radio
                    id: passwordExpirationTypeDisabled
                    name: passwordExpirationType
                    value: Disabled
                    after: >
                        <label class="pad5h" for="passwordExpirationTypeDisabled">Disabled</label>
                passwordExpirationTypeInterval:
                    kind: input.radio
                    id: passwordExpirationTypeInterval
                    name: passwordExpirationType
                    value: Interval
                    after: >
                        <label class="pad5h" for="passwordExpirationTypeInterval">Interval</label>
                passwordExpirationTypeDate:
                    kind: input.radio
                    id: passwordExpirationTypeDate
                    name: passwordExpirationType
                    value: Date
                    after: >
                        <label class="pad5h" for="passwordExpirationTypeDate">Date</label>
                passwordExpirationInterval:
                    tag: div.input-bundle.interval
                    contents:
                        ${passwordExpirationInterval}
                passwordExpirationDate:
                    tag: div.input-bundle.date
                    contents:
                        ${passwordExpirationDate}
        passwordReuseRestriction:
            kind: panel.select.single
            id: password-reuse-restriction
            name: passwordReuseRestriction
            label: Password Reuse Restriction
            options:
                None: None
                Historical: Historical
        passwordHistoryDuration:
            kind: panel.input.text
            id: password-history-duration
            name: passwordHistoryDuration
            label: Password History
            validation: interval onblur
            description: >
                Interval for which users cannot reuse an old password of theirs. Uses <a target="_blank" href="http://www.postgresql.org/docs/9.0/static/functions-datetime.html">PostgreSQL interval notation</a>.
        requireSaltedPasswords:
            kind: panel.input.switchbox
            id: require-salted-passwords
            name: requireSaltedPasswords
            label: Require Passwords To Be Salted
            onText: Required
            offText: Not Required
        passwordsjs:
            tag: script|src=/scripts/xnat/admin/passwords.js


