]> git.agnieray.net Git - galette.git/blob - galette/templates/default/gestion_titres.tpl
Fix XSS, prevent their storage
[galette.git] / galette / templates / default / gestion_titres.tpl
1 {extends file="page.tpl"}
2
3 {block name="content"}
4 <form action="{path_for name="titles"}" method="post" enctype="multipart/form-data">
5 <table class="listing">
6 <thead>
7 <tr>
8 <th class="id_row">#</th>
9 <th>{_T string="Short form"}</th>
10 <th>{_T string="Long form"}</th>
11 <th>{_T string="Actions"}</th>
12 </tr>
13 </thead>
14 <tfoot>
15 <tr>
16 <td data-scope="row">
17 <span class="row-title">
18 {_T string="Add title"}
19 </span>
20 </td>
21 <td class="left" data-title="{_T string="Short form"}">
22 <input size="20" type="text" name="short_label"/>
23 </td>
24 <td class="left" data-title="{_T string="Long form"}">
25 <input size="20" type="text" name="long_label"/>
26 </td>
27 <td class="center actions_row">
28 <input type="hidden" name="new" value="1" />
29 <button type="submit" name="valid">
30 <i class="fas fa-plus" aria-hidden="true"></i>
31 {_T string="Add"}
32 </button>
33 </td>
34 </tr>
35 </tfoot>
36 <tbody>
37 {foreach from=$titles_list item=title name=alltitles}
38 <tr class="{if $smarty.foreach.alltitles.iteration % 2 eq 0}even{else}odd{/if}">
39 <td data-scope="row">
40 {if $preferences->pref_show_id}
41 {$title->id}
42 {else}
43 {$smarty.foreach.alltitles.iteration}
44 {/if}
45 <span class="row-title">
46 <a href="{path_for name="editTitle" data=["id" => $title->id]}">
47 {_T string="%s title" pattern="/%s/" replace=$title->short|escape}
48 </a>
49 </span>
50 </td>
51 <td class="left" data-title="{_T string="Short form"}">{$title->short|escape}</td>
52 <td class="left" data-title="{_T string="Long form"}">{$title->long|escape}</td>
53 <td class="center actions_row">
54 <a
55 href="{path_for name="editTitle" data=["id" => $title->id]}"
56 class="tooltip action"
57 >
58 <i class="fas fa-edit fa-fw"></i>
59 <span class="sr-only">{_T string="Edit '%s' title" pattern="/%s/" replace=$title->short|escape}</span>
60 </a>
61 {if $title->id eq 1 or $title->id eq 2}
62 <img src="{base_url}/{$template_subdir}images/icon-empty.png" alt="" width="16px" height="16px"/>
63 {else}
64 <a
65 href="{path_for name="removeTitle" data=["id" => $title->id]}"
66 class="delete tooltip"
67 >
68 <i class="fa fa-trash fa-fw"></i>
69 <span class="sr-only">{_T string="Delete '%s' title" pattern="/%s/" replace=$title->short|escape}</span>
70 </a>
71 {/if}
72 </td>
73 </tr>
74 {/foreach}
75 </tbody>
76 </table>
77 </form>
78 {/block}
79
80 {block name="javascripts"}
81 <script type="text/javascript">
82 $(function() {
83 {include file="js_removal.tpl"}
84 });
85 </script>
86 {/block}