digitalfabrik/integreat-cms

View on GitHub
integreat_cms/static/src/js/forms/slug-error.ts

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * This file adds the class "border-red-500" to the slug div if there is an error in the field
 */

window.addEventListener("load", () => {
    document
        .querySelectorAll(".slug-error")
        .forEach((node) => node.closest("#slug-div").classList.add("border-red-500"));
});