Add configurable author price calculator
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
(() => {
|
||||
const checkbox = document.querySelector('#use-author-margin');
|
||||
const discountInput = document.querySelector('#discount-percent');
|
||||
if (!checkbox || !discountInput) return;
|
||||
|
||||
const updateDiscountInput = () => {
|
||||
discountInput.disabled = checkbox.checked;
|
||||
};
|
||||
|
||||
checkbox.addEventListener('change', updateDiscountInput);
|
||||
updateDiscountInput();
|
||||
})();
|
||||
Reference in New Issue
Block a user