impress/app/assets/javascripts/closet_lists/form.js
Emi Matchu 1cbcb5bcd6 Add trade warning to closet list form
Just a lil blurb to make sure it's clear that NC sales and stuff are
forbidden! I imagine the people doing it know this, but I want to make
sure we're being explicit, in case there's any element of
miscommunication.
2024-04-16 16:53:30 -07:00

7 lines
211 B
JavaScript

document.addEventListener("change", ({ target }) => {
if (target.matches('select[name="closet_list[visibility]"]')) {
target
.closest("form")
.setAttribute("data-list-visibility", target.value);
}
});