source: trunk/LATMOS-Accounts-Web/root/html/tools/csv/index.tt @ 2121

Last change on this file since 2121 was 1987, checked in by nanardon, 7 years ago

Add page to create objects from CSV files

File size: 987 bytes
Line 
1[% l('This page allow you to create multiple object from information contains in
2a CSV file.
3
4The first line must contains the name of attributes, each following lines
5contains single value attribute for futur objects.
6
7For user, the object name can be omitted, object name will be built from
8firstname and lastname (sn and givenName).') | html_break %]
9
10<p>[% l('Example:') %]
11
12<pre>
13givenName,sn,company
14John,Smith,MyComp
15</pre>
16</p>
17
18<form action="[% c.uri_for('/tools', 'csv') %]" method="post"
19    enctype="multipart/form-data">
20
21<label for=otype>[% l('Type of object to create') %]</label>
22<select id=otype name=otype>
23[% FOREACH o = [ 'user', 'group' ] %]
24[% IF c.model('Accounts').db.check_acl(o, '@CREATE', 'w') %]
25<option value="[% o %]">[% c.model('Accounts').obj_to_label(o) |html %]
26    </option>
27[% END %]
28[% END %]
29</select>
30<br>
31<label for=file>[% l('Select a CSV file') | html %]</label>
32<input type="file" name="csv" id="csvAccount">
33<br>
34<input type="submit">
35</form>
Note: See TracBrowser for help on using the repository browser.