Closed jcervantes-sipecom closed 9 months ago
Also noticed something similar with <tr><td>...</td></tr>
markup
Hi, I resolved it with an attribute in HTML next to the tag: hidden
For example:
<ol>
<li hidden>##FOREACHitems##</li>
<li>##IFticket.itemtype## ##ticket.itemtype##: ##ticket.item.name## ##ENDIFticket.itemtype## ##ELSEticket.itemtype##No items associated.##ENDELSEticket.itemtype##</li>
<li hidden>##ENDFOREACHitems##</li>
</ol>
For table is the same:
<table><tbody>
<tr hidden>
<td>##FOREACHtickets##</td>
</tr>
<tr>
<td>##ticket.authors##</span></td>
<td><span><a href="##ticket.url##">##ticket.title##</a></span></td>
<td>##ticket.priority##</span></td>
<td><span>##ticket.status##</span></td>
<td><span>##IFticket.assigntousers####ticket.assigntousers##<br>##ENDIFticket.assigntousers####IFticket.assigntogroups##<br>##ticket.assigntogroups## ##ENDIFticket.assigntogroups####IFticket.assigntosupplier##<br>##ticket.assigntosupplier## ##ENDIFticket.assigntosupplier##</span></td>
<td><span>##ticket.creationdate##</span></td>
</tr>
<tr hidden>
<td>##ENDFOREACHtickets##</td>
</tr>
</tbody></table>
The result in HTML is visible as what was desired.
@jcervantes-sipecom Thanks for the fix ! And merry Xmas ;-)
Code of Conduct
Is there an existing issue for this?
Version
10.0.10
Bug description
When I try to add ##FOREACHitems## between
<ul>
or<ol>
and<li>
html tags in HTML source code editor, the ##FOREACHitems## and ##ENDFOREACHitems## glpi tags dissapear after I save the template:After saving the template:
It's necessary that ##FOREACHitems## should be between these 2 HTML tags because of presentation when adding multiples items in a ticket, for example:
This happened the first time after saving the template, and not editting the template anymore:
But if for some reason, the template is editting, it's stoped working correctly because the clause: ##IFticket.itemtype## and the tag ##FOREACHitems## dissappear:
Relevant log output
Page URL
/front/notificationtemplatetranslation.form.php
Steps To reproduce
Your GLPI setup information
Information about system installation and configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
I also test putting ##FOREACHitems## after
<li>
:But this does not work well with multiple items, the list does not present correctly:
And ##FOREACHitems## before
<ol>
or<ul>
:But this does not present well, when this should be: 1), 2), 3)
I tried many combinations, but nothing works to present correctly.