diff --git a/admin/src/main/resources/static/ui/uiUtil.js b/admin/src/main/resources/static/ui/uiUtil.js index 4275841c..583803ee 100644 --- a/admin/src/main/resources/static/ui/uiUtil.js +++ b/admin/src/main/resources/static/ui/uiUtil.js @@ -465,4 +465,8 @@ const formatNumberWithComma = (value) => { return Number(value).toLocaleString(); } +const limitMaxLength = (el) => { + const maxLength = parseInt(el.getAttribute('maxlength'), 10); + el.value = el.value.replace(/\D/g, '').slice(0, maxLength); +} diff --git a/admin/src/main/resources/templates/households/modal/modal-forest-product.html b/admin/src/main/resources/templates/households/modal/modal-forest-product.html index 8f89a30e..70447288 100644 --- a/admin/src/main/resources/templates/households/modal/modal-forest-product.html +++ b/admin/src/main/resources/templates/households/modal/modal-forest-product.html @@ -7,7 +7,7 @@