source: main/waeup.ikoba/trunk/src/waeup/ikoba/browser/templates/fileupload.pt @ 12444

Last change on this file since 12444 was 12444, checked in by Henrik Bettermann, 10 years ago

We need to provide unique filenames. Let's use the document id for the filename and not the download_name of the respective viewlet.

File size: 1.5 KB
Line 
1<tr i18n:domain="waeup.ikoba" tal:condition = "viewlet/show_viewlet">
2  <td class="fieldname">
3    <span tal:replace="viewlet/label">FILENAME</span>:
4  </td>
5  <td>
6
7    <tal:file tal:condition="viewlet/file_exists">
8      <a tal:attributes="href python: view.url(context, viewlet.download_name)"
9         tal:content="viewlet/download_filename"
10         target="image">
11        LINK
12      </a>&nbsp;
13      <input type="submit"
14             tal:attributes="id python:('delete_%s' % viewlet.input_name);
15                name python:('delete_%s' % viewlet.input_name);
16                value viewlet/delete_button;
17                onclick python:'return window.confirm(\'%s\')' % view.deletion_warning"
18             class="btn btn-danger btn-xs"/>
19    </tal:file>
20
21                <div class="input-group" tal:condition="not: viewlet/file_exists">
22                        <div class="input-group-btn">
23                                <div class="btn btn-default btn-file">
24          Select new file&hellip;
25          <input type="file" tal:attributes="name viewlet/input_name" />
26        </div>
27                        </div>
28                        <input type="text" class="form-control" readonly>
29      <div class="input-group-btn">
30        <input type="submit"
31               tal:attributes="id python:('upload_%s' % viewlet.input_name);
32                name python:('upload_%s' % viewlet.input_name);
33                value viewlet/upload_button"
34               class="btn btn-primary" />
35        (<span tal:replace="viewlet/max_upload_size">10 kB</span> max.)
36      </div>
37    </div>
38  </td>
39</tr>
Note: See TracBrowser for help on using the repository browser.