add payment_link and banks
This commit is contained in:
1 parent
2ae79b1ca4
commit
de3135b588
100 files changed
+6167
-47
No files matched your search
@@ -0,0 +1,25 @@
|
||||
/* Selection changes presentation only; permissions and updates remain server-side. */
|
||||
(() => {
|
||||
'use strict';
|
||||
const form = document.querySelector('[data-bank-selection]');
|
||||
if (!form) return;
|
||||
const boxes = Array.from(form.querySelectorAll('input[name="accounts"]'));
|
||||
const all = form.querySelector('[data-select-all]');
|
||||
const count = form.querySelector('[data-selection-count]');
|
||||
const submit = form.querySelector('[data-bulk-submit]');
|
||||
if (!all || !count || !submit) return;
|
||||
const update = () => {
|
||||
const selected = boxes.filter(box => box.checked).length;
|
||||
all.checked = selected > 0 && selected === boxes.length;
|
||||
all.indeterminate = selected > 0 && selected < boxes.length;
|
||||
count.textContent = selected ? `${selected.toLocaleString('fa-IR')} حساب انتخاب شده` : 'حسابهای موردنظر را انتخاب کنید.';
|
||||
submit.disabled = selected === 0;
|
||||
};
|
||||
all.addEventListener('change', () => {
|
||||
boxes.forEach(box => { box.checked = all.checked; });
|
||||
update();
|
||||
});
|
||||
boxes.forEach(box => box.addEventListener('change', update));
|
||||
window.addEventListener('pageshow', update);
|
||||
update();
|
||||
})();
|
||||
Reference in new issue
Block a user