diff --git a/CHANGELOG.md b/CHANGELOG.md index f7f8e1c..f9b43b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [unreleased] - + +### Fixed + +- Fixed the minimum consumable quantity at 1 + ## [1.15.3] - 2026-04-29 ### Fixed diff --git a/templates/tickets/form.html.twig b/templates/tickets/form.html.twig index 60a16f6..8598738 100644 --- a/templates/tickets/form.html.twig +++ b/templates/tickets/form.html.twig @@ -90,7 +90,7 @@ form_help.setAttribute('data-bs-title', __('Maximum consumable quantity', 'credit') + ' : 0 '); form_help.setAttribute('data-bs-content', __('Maximum consumable quantity', 'credit') + ' : 0 '); } else { - quantity_field.classList.remove('d-none'); + quantity.closest('.form-field').classList.remove('d-none'); $.ajax({ type: 'POST', url: '{{ path('plugins/credit/ajax/dropdownQuantity.php') }}', @@ -99,7 +99,7 @@ } }).done(function (data) { quantity.max = data; - quantity.value = 0; + quantity.value = 1; form_help.setAttribute('data-bs-title', __('Maximum consumable quantity', 'credit') + ' : ' + data); form_help.setAttribute('data-bs-content', __('Maximum consumable quantity', 'credit') + ' : ' + data); });