-
Notifications
You must be signed in to change notification settings - Fork 342
refactor(tooltips): standardize popup template names and update refer… #1206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,152 @@ | ||||||
| {if $authorized} | ||||||
| {*CHECK IF USER HAS PERMISSIONS TO THE RESOURCES OF THE RESERVATIONS, HIDE DETAILS IF HE DOESN'T HAVE PERMISSIONS TO ALL OF THEM*} | ||||||
| {assign var=isResourcePermitted value=false} | ||||||
| {foreach from=$resources item=checkResourcePermission} | ||||||
| {if in_array($checkResourcePermission->Id(), $CanViewResourceReservations)} | ||||||
| {assign var=isResourcePermitted value=true} | ||||||
| {break} | ||||||
| {/if} | ||||||
| {/foreach} | ||||||
JohnVillalovos marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| {*HOWEVER THE USER CAN SEE THE RESERVATION IF HE IS A OWNER, PARTICIPANT OR INVITEE*} | ||||||
| {if $isResourcePermitted == false} | ||||||
| {if $UserId == $OwnerId || $IAmParticipating || $IAmInvited} | ||||||
| {assign var=isResourcePermitted value=true} | ||||||
| {/if} | ||||||
| {/if} | ||||||
|
|
||||||
| {* Don't show anything if user doesn't have permissions - this prevents tooltip from appearing *} | ||||||
| {if !$isResourcePermitted} | ||||||
| {* Return empty - no tooltip will be shown *} | ||||||
| {else} | ||||||
| <div class="res_popup_details mb-0"> | ||||||
JohnVillalovos marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| {capture "name"} | ||||||
| <div class="user fw-bold"> | ||||||
| {if $hideUserInfo || $hideDetails} | ||||||
| {translate key=Private} | ||||||
| {else} | ||||||
| {$fullName} | ||||||
|
||||||
| {$fullName} | |
| {$fullName|escape} |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this template is rendered as HTML inside a Bootstrap tooltip (data-bs-html=true), $email is treated as markup. It's currently output without escaping; please HTML-escape it (or output a deliberately constructed safe link) to prevent injection.
| {$email} | |
| {$email|escape:'html'} |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$phone is output unescaped inside HTML tooltip content (data-bs-html=true). Please HTML-escape it (or generate a safe tel: link) to avoid potential markup injection/broken rendering.
| {$phone} | |
| {$phone|escape:'html'} |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource names are inserted into HTML tooltip content via {$resource->Name()} without escaping. Since tooltip rendering uses data-bs-html=true, resource names containing special characters could be interpreted as markup. Please apply HTML escaping to Name() output here.
| {$resource->Name()} | |
| {$resource->Name()|escape:'html'} |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessory names are output unescaped inside HTML tooltip content (data-bs-html=true). Please HTML-escape $accessory->Name to avoid markup injection/broken tooltip rendering.
| {$accessory->Name} ({$accessory->QuantityReserved}) | |
| {$accessory->Name|escape:'html'} ({$accessory->QuantityReserved}) |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.