| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- include ./material_symbol
- mixin formMessages
- div(data-ol-form-messages='' role='alert')
- mixin formMessagesNewStyle(extraClass = 'form-messages-bottom-margin')
- - const attrs = extraClass ? {class: extraClass} : {}
- div(data-ol-form-messages-new-style='' role='alert')&attributes(attrs)
- mixin customFormMessage(key, kind)
- if kind === 'success'
- .alert.alert-success(
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='polite'
- )
- block
- else if kind === 'danger'
- .alert.alert-danger(
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='assertive'
- )
- block
- else
- .alert.alert-warning(
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='polite'
- )
- block
- mixin customFormMessageNewStyle(key, kind, extraClass = 'mb-3')
- - extraClass = extraClass ? ' ' + extraClass : ''
- if kind === 'success'
- div(
- class='notification notification-type-success' + extraClass
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='polite'
- )
- .notification-icon
- +material-symbol('check_circle')
- .notification-content.text-left
- block
- else if kind === 'danger'
- div(
- class='notification notification-type-error' + extraClass
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='polite'
- )
- .notification-icon
- +material-symbol('error')
- .notification-content.text-left
- block
- else
- div(
- class='notification notification-type-warning' + extraClass
- hidden
- data-ol-custom-form-message=key
- role='alert'
- aria-live='polite'
- )
- .notification-icon
- +material-symbol('warning')
- .notification-content.text-left
- block
- mixin customValidationMessageNewStyle(key)
- .notification.notification-type-error(hidden data-ol-custom-form-message=key)
- .notification-icon
- +material-symbol('error')
- .notification-content.text-left.small
- block
|