source: main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imageupload.pt @ 14466

Last change on this file since 14466 was 11558, checked in by Henrik Bettermann, 11 years ago

File input fields brought into shape with Bootstrap 3. Technique adapted from http://labs.abeautifulsite.net/demos/bootstrap-file-inputs/.

File size: 1.2 KB
Line 
1<tr i18n:domain="waeup.kofa">
2  <td class="fieldname">
3    <span tal:replace="viewlet/label">FILENAME</span>:
4  </td>
5  <td>
6    <img align="middle" height="125px"
7         tal:attributes="src python: view.url(context, viewlet.download_name)" />
8    &nbsp;
9    <input type="submit" tal:condition="viewlet/file_exists"
10     tal:attributes="id python:('delete_%s' % viewlet.input_name);
11        name python:('delete_%s' % viewlet.input_name)"
12     value="Delete" class="btn btn-danger" />
13    <br /><br />
14
15                <div class="input-group">
16                        <div class="input-group-btn">
17                                <div class="btn btn-default btn-file">
18          Select new file&hellip;
19          <input type="file" tal:attributes="name viewlet/input_name" />
20        </div>
21                        </div>
22                        <input type="text" class="form-control" readonly>
23      <div class="input-group-btn">
24        <input type="submit"
25               tal:attributes="id python:('upload_%s' % viewlet.input_name);
26                name python:('upload_%s' % viewlet.input_name);
27                value viewlet/upload_button"
28               class="btn btn-primary" />
29        (<span tal:replace="viewlet/max_upload_size">10 kB</span> max.)
30      </div>
31    </div>
32  </td>
33</tr>
Note: See TracBrowser for help on using the repository browser.