emailServerSettings:
    kind: panel.form
    method: POST
    contentType: json
    url: /xapi/notifications
    name: emailServerSettings
    label: Mail Server Settings
    contents:

        smtpEnabled:
            kind: panel.input.switchbox
            label: Enable SMTP?
            onText: Enabled
            offText: Disabled

        serverSettings:
            kind: panel.subhead
            text: Server
        smtpHostname:
            kind: panel.input.text
            label: Host
            placeholder: localhost
        smtpPort:
            kind: panel.input.number
            label: Port
            placeholder: 25
            validation: allow-empty integer
        smtpProtocol:
            kind: panel.input.text
            label: Protocol
            placeholder: smtp

        authentication:
            kind: panel.subhead
            text: Authentication
        smtpAuth:
            kind: panel.input.switchbox
            label: SMTP Auth?
            onText: Enabled
            offText: Disabled
        smtpUsername:
            kind: panel.input.text
            label: Username
        smtpPassword:
            kind: panel.input.password
            label: Password

        otherSettings:
            kind: panel.subhead
            text: Other Settings
        smtpStartTls:
            kind: panel.input.switchbox
            label: Start TLS?
            onText: Enabled
            offText: Disabled
        smtpSslTrust:
            kind: panel.input.text
            label: SSL Trust
        emailPrefix:
            kind: panel.input.text
            label: Email Prefix
            placeholder: XNAT

