Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

## Fixe

- Fix the maximum consumable quantity value displayed in the tooltip

## [1.15.0] - 2025-09-29

### Added
Expand Down
6 changes: 4 additions & 2 deletions templates/tickets/consume.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,15 @@
function getQuantityRemaining{{ rand }}(val) {
console.log('plugin-credit-quantity_{{ rand }}');
consumeblock = document.querySelector('[name="credit_consume_{{ rand }}"]');
quantity = consumeblock.querySelector('[id*="plugin-credit-quantity_{{ rand }}"]');
quantity_label = consumeblock.querySelector('[for*="plugin-credit-quantity_{{ rand }}"]');
quantity = consumeblock.querySelector('[id*="plugin_credit_quantity_{{ rand }}"]');
quantity_label = consumeblock.querySelector('[for*="plugin_credit_quantity_{{ rand }}"]');
if (val == 0) {
quantity_label.style.display = 'none';
quantity.style.display = 'none';

quantity.max = 0;
quantity.value = 0;
quantity_label.querySelector('span.form-help').setAttribute('data-bs-title', __('Maximum consumable quantity', 'credit') + ' : 0 ');
quantity_label.querySelector('span.form-help').setAttribute('data-bs-content', __('Maximum consumable quantity', 'credit') + ' : 0 ');
} else {
quantity_label.style.display = 'block';
Expand All @@ -118,6 +119,7 @@
}).done(function (data) {
quantity.max = data;
quantity.value = 0;
quantity_label.querySelector('span.form-help').setAttribute('data-bs-title', __('Maximum consumable quantity', 'credit') + ' : <b>' + data);
quantity_label.querySelector('span.form-help').setAttribute('data-bs-content', __('Maximum consumable quantity', 'credit') + ' : <b>' + data);
});
}
Expand Down