Adds tooltip on custom field (#12505)

* adds tooltip on custom field #12131

* adds description field check

* fixed field name

* updated code to match the panel

* added escape filter on description
This commit is contained in:
Abhimanyu Saharan 2023-05-09 19:50:02 +05:30 committed by GitHub
parent c55c14ea4c
commit 4e49f4a434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -132,9 +132,16 @@
</tr>
{% for field, value in fields.items %}
<tr>
<td>
<span title="{{ field.description|escape }}">{{ field }}</span>
</td>
<th scope="row">{{ field }}
{% if field.description %}
<i
class="mdi mdi-information text-primary"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="{{ field.description|escape }}"
></i>
{% endif %}
</th>
<td>
{% customfield_value field value %}
</td>

View File

@ -12,8 +12,15 @@
<table class="table table-hover attr-table">
{% for field, value in fields.items %}
<tr>
<th scope="row">
<span title="{{ field.description|escape }}">{{ field }}</span>
<th scope="row">{{ field }}
{% if field.description %}
<i
class="mdi mdi-information text-primary"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="{{ field.description|escape }}"
></i>
{% endif %}
</th>
<td>
{% customfield_value field value %}