source: LATMOS-Accounts-Web/root/html/massedit/index.tt @ 223

Last change on this file since 223 was 223, checked in by nanardon, 15 years ago
  • form method = POST
  • Property svn:keywords set to Id Rev
File size: 2.5 KB
Line 
1<form action="[% c.uri_for() %]" method="post">
2<select name="otype">
3[% FOREACH otype = db.list_supported_objects() %]
4<option value="[% otype | html %]"[% ' "selected"' IF otype == c.req.param('otype') %]>[% otype | html %]</option>
5[% END %]
6</select>
7<input type="submit">
8</form>
9
10[% IF c.req.param('otype') %]
11[% INCLUDE 'includes/filter.tt'
12    formuri = c.uri_for()
13    otype = c.req.param('otype')
14%]
15[% END %]
16
17<table border="1">
18<form action="[% c.uri_for() %]" method="POST">
19<input type="hidden" name="otype" value="[% c.req.param('otype') %]">
20<tr>
21<th>Object name</th>
22[% FOREACH atcol = c.req.param('attrcol') %]
23[% NEXT IF NOT atcol %]
24    <th>
25    <select name="attrcol">
26    <option value="">Remove</option>
27    [% FOREACH f = db.list_canonical_fields(c.req.param('otype'), 'w') %]
28    <option value="[% f | html %]" [% ' selected="1"' IF atcol == f %]>
29        [% c.model('AttrForms').attr_label(f) | html %]
30    </option>
31    [% END %]
32    </select>
33    </th>
34[% END %]
35    <th>
36    <select name="attrcol">
37    <option value="">Select to add</option>
38    [% FOREACH f = db.list_canonical_fields(c.req.param('otype'), 'w') %]
39    <option value="[% f | html %]">
40        [% c.model('AttrForms').attr_label(f) | html %]
41    </option>
42    [% END %]
43    </select>
44    <input type="submit"></td>
45</tr>
46</form>
47
48<form action="[% c.uri_for() %]" method="POST">
49<input type="hidden" name="otype" value="[% c.req.param('otype') %]">
50[% FOREACH atcol = c.req.param('attrcol') %]
51[% NEXT IF NOT atcol %]
52<input type="hidden" name="attrcol" value="[% atcol %]">
53[% END %]
54<tr>
55<th>Change for All</th>
56[% attrform = c.model('AttrForms', c.req.param('otype'), c.req.param('otype'), db) %]
57[% FOREACH atcol = c.req.param('attrcol') %]
58[% NEXT IF NOT atcol %]
59<td>
60    [% attrform.attr_field(atcol) %]
61</td>
62[% END %]
63<td><input type="submit"></td>
64</tr>
65</form>
66
67<form action="[% c.uri_for() %]" method="POST">
68<input type="hidden" name="otype" value="[% c.req.param('otype') %]">
69[% FOREACH atcol = c.req.param('attrcol') %]
70[% NEXT IF NOT atcol %]
71<input type="hidden" name="attrcol" value="[% atcol %]">
72[% END %]
73[% FOREACH obj = objectslist %]
74[% attrform = c.model('AttrForms', c.req.param('otype'), obj) %]
75<tr>
76<th>[% obj.id | html  %]</th>
77[% FOREACH atcol = c.req.param('attrcol') %]
78[% NEXT IF NOT atcol %]
79<td>
80    [% attrform.attr_field(atcol) %]
81</td>
82[% END %]
83<td></td>
84</tr>
85[% END %]
86<tr>
87<th></th>
88[% FOREACH atcol = c.req.param('attrcol') %]
89[% NEXT IF NOT atcol %]
90<td>
91</td>
92[% END %]
93<td><input type="submit"></td>
94</tr>
95</form>
96</table>
Note: See TracBrowser for help on using the repository browser.