source: branches/2.0/LATMOS-Accounts-Web/root/html/aliases/index.tt @ 1062

Last change on this file since 1062 was 687, checked in by nanardon, 14 years ago
  • add label in alias forms (report by E. Porteneuve)
File size: 2.6 KB
Line 
1<div style="border: outset; padding: 0.5em;">
2[% IF c.model('Accounts').db.check_acl('aliases', 'forward', 'w') %]
3<table border=1>
4<tr><td valign="top">
5<form action="[% c.uri_for() %]" method="POST">
6<p>Filtre:</p>
7<input type="text" name="filter" value="[% c.req.param('filter') | html %]"><br>
8<input type="submit">
9</form>
10</td>
11[% IF c.model('Accounts').db.check_acl('aliases', '@CREATE', 'w') %]
12<td valign="top">
13<p>Créer un alias</p>
14<form action="[% c.uri_for() %]" method="POST">
15<input type="hidden" name="filter" value="[% c.req.param('filter') | html %]">
16<table>
17<tr><th>Nom:</th><td><input type="text" name="name" id="newal">
18<span style="display:none" id="newalind">Searching...</span>
19<span id="span_newval"></span><br>
20[% c.prototype.observe_field('newal', {
21    url => c.uri_for('/ajax', 'objexist', 'aliases'),
22    with   => "'val='+value+ '&attr=forward'",
23    update => 'span_newval',
24    frequency => 1,
25    min_chars => 1,
26    indicator => 'newalind',
27}) %]
28</td></tr>
29<tr><th>renvois vers:</th><td><input type="text" name="forward"></td></tr>
30<tr><td></td><td><input type="submit" value="créer"></td></tr>
31</table>
32</form>
33</td>
34[% END %]
35</tr>
36</table>
37</div>
38
39[% aliases = c.model('Accounts').list_unowned_aliases(c.req.param('filter')) %]
40
41<div style="border: outset; padding: 0.5em;">
42[% FOREACH alias = aliases.keys.sort %]
43[% IF loop.first %]
44<form action="[% c.uri_for() %]" method="POST">
45<input type="hidden" name="filter" value="[% c.req.param('filter') | html %]">
46<table border=1>
47<tr><th>N°</th><th>Nom</th><th>renvois</th><th>Sup.</th></tr>
48[% END %]
49<tr>
50    <td>[% loop.count | html %]</td>
51    <td>
52    <input type="hidden" name="al" value="[% alias | html %]">
53    <input type="text" name="name" id="[% 'aliases' _ loop.count %]" value="[% alias | html %]">
54<span style="display:none" id="[% 'aliasesind' _ loop.count %]">Searching...</span>
55<span id="[% 'aliases_span' _ loop.count %]"></span><br>
56[% c.prototype.observe_field('aliases' _ loop.count, {
57    url => c.uri_for('/ajax', 'objexist', 'aliases'),
58    with   => "'val='+value+ '&attr=forward'",
59    update => 'aliases_span' _ loop.count,
60    frequency => 1,
61    min_chars => 1,
62    indicator => 'aliasesind' _ loop.count,
63}) %]
64    </td>
65    <td>
66        <input type="text" name="forward" value="[% aliases.$alias.join(',') |html %]">
67    </td>
68    <td><input type="checkbox" name="del[% loop.count %]"></td>
69</tr>
70[% IF loop.last %]
71<tr>
72<td colspan=4><input type=submit></td>
73</tr>
74</table>
75</form>
76[% END %]
77[% END %]
78[% ELSE %]
79<p>Vous n'avez pas la permission d'acceder à cette page.</p>
80[% END %] [% # ACLS %]
81</div>
Note: See TracBrowser for help on using the repository browser.