# ===================================
#  Field Definitions
# ===================================

tabs:
    defaultTab: backend::lang.user.account

    fields:
        login:
            span: left
            label: Username

        email:
            span: right
            type: email
            label: backend::lang.user.email

        send_invite:
            context: create
            type: checkbox
            label: backend::lang.user.send_invite
            comment: backend::lang.user.send_invite_comment
            default: true

        first_name:
            span: left
            label: backend::lang.user.first_name

        last_name:
            span: right
            label: backend::lang.user.last_name

        password:
            type: password
            span: left
            label: backend::lang.user.password

        password_confirmation:
            type: password
            span: right
            label: backend::lang.user.password_confirmation

        role:
            context: [create, update]
            label: backend::lang.user.role_field
            commentAbove: backend::lang.user.role_comment
            type: radio
            permissions: admins.manage

        groups:
            label: backend::lang.user.groups
            commentAbove: backend::lang.user.groups_comment
            type: checkboxlist
            tab: backend::lang.user.groups
            permissions: admins.manage

        permissions:
            context: [create, update]
            tab: backend::lang.user.permissions
            type: Backend\FormWidgets\PermissionEditor
            permissions: admins.roles
            trigger:
                action: disable
                field: is_superuser
                condition: checked

secondaryTabs:
    fields:
        avatar:
            label: backend::lang.user.avatar
            type: fileupload
            mode: image
            imageHeight: 250
            imageWidth: 250
