diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6c32e32680..ea80ea2c0d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -52,6 +52,7 @@ v29.0.00 Bug Fixes System: fixed issue with search terms containing a : full colon (special character) + System: Add max and min limits to form values Sidebar: fixed localization of Roles menu items. Activities: fixed activity missing from the timetable if it doesn't have a category Activities: fixed missing registration button for parents on View Activities page diff --git a/src/Forms/Input/Number.php b/src/Forms/Input/Number.php index 861339b2b4..78c6eee24e 100644 --- a/src/Forms/Input/Number.php +++ b/src/Forms/Input/Number.php @@ -110,6 +110,6 @@ protected function setValidation() */ protected function getElement() { - return Component::render(Number::class, $this->getAttributeArray() + []); + return Component::render(Number::class, $this->getAttributeArray() + ["min" => $this->min, "max" => $this->max]); } } diff --git a/src/Forms/Input/Number.template.php b/src/Forms/Input/Number.template.php index 44393e7b73..bf7a23e1e7 100644 --- a/src/Forms/Input/Number.template.php +++ b/src/Forms/Input/Number.template.php @@ -1,5 +1,6 @@
- - class="w-full rounded-md border py-2 text-gray-900 placeholder:text-gray-500 + + min= max= + class="w-full rounded-md border py-2 text-gray-900 placeholder:text-gray-500 focus:ring-1 focus:ring-inset focus:ring-blue-500 sm:text-sm sm:leading-6" />