mirror of https://github.com/logos-co/open-law.git
fix initUnsavedChangedAlerts
This commit is contained in:
parent
b36cb9a9be
commit
906c581dbf
File diff suppressed because one or more lines are too long
|
@ -20,18 +20,19 @@ export const initUnsavedChangedAlerts = () => {
|
|||
'.book-tags-input',
|
||||
'.multiple-input-word',
|
||||
'.contributor-role-select',
|
||||
// '.edit-permissions-btn',
|
||||
'.add-contributor-btn',
|
||||
'input[type=checkbox]',
|
||||
];
|
||||
|
||||
elementsSelectors.forEach(selector => {
|
||||
const elements: NodeListOf<HTMLElement> =
|
||||
document.querySelectorAll(selector);
|
||||
elements.forEach(element => {
|
||||
initAlertOnClick(element);
|
||||
if (window.location.href.includes('/settings')) {
|
||||
elementsSelectors.forEach(selector => {
|
||||
const elements: NodeListOf<HTMLElement> =
|
||||
document.querySelectorAll(selector);
|
||||
elements.forEach(element => {
|
||||
initAlertOnClick(element);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const elementsOnClickPrevent = document.querySelectorAll(
|
||||
'.prevent-unsaved-changes-event',
|
||||
|
|
Loading…
Reference in New Issue