blob: 258ef32698e33dc0e2cb0ade09e2bc3d0018927d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<div id="input_form">
<form method="post" action="">
<table border=0>
<tr><th>Attribute</th><th>Value</th><th></th></tr>
[% FOREACH attr IN values %]
<tr>
<td>[% attr.name %]</td>
<td>
[% FOREACH val IN attr.values %]
[% IF attr.editable %]<input type=hidden name="[% attr.name %]_old" value="[% val %]">
<input name="[% attr.name %]_new" value="[% val %]">
[% ELSE %]
[% val %]
<br/>
[% END %]
</td>
<td>
[% IF attr.addable AND attr.editable %]
<button type="button" onclick="location='/user/add/[% attr.name %]'">[% l('Add') %]</button>
[% END %]
[% IF attr.removable AND attr.editable %]
<button type="button" onclick="location='/user/delete/[% attr.name %]/[% val %]'">[% l('Delete') %]</button>
[% END %]
[% END %]
</td>
</tr>
[% END %]
<tr>
<td colspan="3" style="text-align:center;"><button type="Submit" value="[% l('Update') %]">[% l('Update') %]</button></td>
</tr>
</table>
</form>
<hr />
<form method="post" action="/user/add">
<p>
<select name="attribute">
[% FOREACH attr IN may %]
<option value="[% attr %]">[% attr %]</option>
[% END %]
</select>
<input name="value" value="" />
<button type="submit" value="[% l('Add') %]">[% l('Add') %]</button>
</p>
</form>
</div>
|