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

fields:
    is_active:
        label: Active
        type: switch

    name:
        label: Name
        span: auto

    color:
        label: Color
        type: colorpicker
        span: auto

    parent:
        label: Parent
        type: relation
        emptyOption: -- None --
        span: auto

secondaryTabs:
    fields:
        send_email:
            label: Send an email to customer when his/her order has changed.
            type: switch
            span: auto
            tab: Customer

        attach_pdf:
            label: Attach invoice PDF to email.
            type: switch
            span: auto
            tab: Customer

        mail_template:
            label: Mail template
            tab: Customer
            type: relation
            select: code
            trigger:
                action: enable
                field: send_email
                condition: checked
            # options: listAllTemplates

        description:
            label: Description
            tab: Customer
            type: textarea

        send_email_to_admin:
            label: Send an email to admin when customer's order has changed.
            type: switch
            span: auto
            tab: Admin

        admin_mail_template:
            label: Mail template
            tab: Admin
            type: relation
            select: code
            trigger:
                action: enable
                field: send_email_to_admin
                condition: checked


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

fields:
    is_active:
        label: Active
        type: switch

    name:
        label: Name
        span: auto

    color:
        label: Color
        type: colorpicker
        span: auto

    parent:
        label: Parent
        type: relation
        emptyOption: -- None --
        span: auto

secondaryTabs:
    fields:
        send_email:
            label: Send an email to customer when his/her order has changed.
            type: switch
            span: auto
            tab: Customer

        attach_pdf:
            label: Attach invoice PDF to email.
            type: switch
            span: auto
            tab: Customer

        mail_template:
            label: Mail template
            tab: Customer
            type: relation
            select: code
            emptyOption: -- None --
            trigger:
                action: enable
                field: send_email
                condition: checked
            # options: listAllTemplates

        description:
            label: Description
            tab: Customer
            type: textarea

        send_email_to_admin:
            label: Send an email to admin when customer's order has changed.
            type: switch
            span: auto
            tab: Admin

        admin_mail_template:
            label: Mail template
            tab: Admin
            type: relation
            select: code
            emptyOption: -- None --
            trigger:
                action: enable
                field: send_email_to_admin
                condition: checked


Add emptyOption on email template order status log
Add emptyOption on email template order status log
