Files
Verso/services/web/app/views/_mixins/formMessages.pug
T
Rebeka Dekany 62fa7e9319 Remove Font Awesome files and references from web (#32531)
* Remove Font Awesome files and references

* Remove dead Font Awesome references

* Remove icon reference from `linkPrintNewTab` mixin

* Remove unused `customValidationMessage`

* Remove dead Font Awesome references

* Remove FA reference and disable "Monthly metrics emails" subscription link when loading

* Revert daterangepicker icon styles

GitOrigin-RevId: e08d4b61e35bae305f771d9949c18edf8a163575
2026-04-08 08:04:53 +00:00

81 lines
1.9 KiB
Plaintext

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