Fix tooltip display for cost comments#22963
Open
eduardomozart wants to merge 2 commits intoglpi-project:11.0/bugfixesfrom
Open
Fix tooltip display for cost comments#22963eduardomozart wants to merge 2 commits intoglpi-project:11.0/bugfixesfrom
eduardomozart wants to merge 2 commits intoglpi-project:11.0/bugfixesfrom
Conversation
The tooltip for Project Costs is always shown for comments, even when the comment is empty: https://github.com/eduardomozart/glpi/blob/72414484de398740ae298021d728b11bf24f756c/src/ProjectCost.php#L364-L380 The tooltip is displayed unconditionally, regardless of whether there's actually a comment or not. The same issue exists in src/ContractCost.php at line 365. To fix this, the tooltip should only be rendered when $data['comment'] is not empty.
Fix tooltip display logic for comments in ContractCost.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tooltip for Project Costs is always shown for comments, even when the comment is empty:
https://github.com/eduardomozart/glpi/blob/72414484de398740ae298021d728b11bf24f756c/src/ProjectCost.php#L364-L380
The tooltip is displayed unconditionally, regardless of whether there's actually a comment or not. The same issue exists in src/ContractCost.php at line 365.
To fix this, the tooltip should only be rendered when $data['comment'] is not empty.
Checklist before requesting a review
Please delete options that are not relevant.
Description
Screenshots (if appropriate):