Skip to content

Commit a1693bf

Browse files
committed
improve comments
1 parent 6cb20cc commit a1693bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web_src/js/features/common-button.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export function initGlobalDeleteButton(): void {
1717
// Some model/form elements will be filled by `data-id` / `data-name` / `data-data-xxx` attributes.
1818
// If there is a form defined by `data-form`, then the form will be submitted as-is (without any modification).
1919
// If there is no form, then the data will be posted to `data-url`.
20-
// TODO: it's not encouraged to use this method. `show-modal` does far better than this.
20+
// TODO: do not use this method in new code. `show-modal` / `link-action(data-modal-confirm)` does far better than this.
21+
// FIXME: all legacy `delete-button` should be refactored to use `show-modal` or `link-action`
2122
for (const btn of document.querySelectorAll<HTMLElement>('.delete-button')) {
2223
btn.addEventListener('click', (e) => {
2324
e.preventDefault();

0 commit comments

Comments
 (0)