Changeset 11567


Ignore:
Timestamp:
2 Apr 2014, 19:13:44 (11 years ago)
Author:
Henrik Bettermann
Message:

Add more safety belts. Do not show upload field if file exists. File should be deleted first.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt

    r11559 r11567  
    1414             tal:attributes="id python:('delete_%s' % viewlet.input_name);
    1515                name python:('delete_%s' % viewlet.input_name);
    16                 value viewlet/delete_button"
    17              class="btn btn-danger btn-xs" />
    18       <br /><br />
     16                value viewlet/delete_button;
     17                onclick python:'return window.confirm(\'%s\')' % view.deletion_warning"
     18             class="btn btn-danger btn-xs"/>
    1919    </tal:file>
    2020
    21                 <div class="input-group">
     21                <div class="input-group" tal:condition="not: viewlet/file_exists">
    2222                        <div class="input-group-btn">
    2323                                <div class="btn btn-default btn-file">
     
    3535        (<span tal:replace="viewlet/max_upload_size">10 kB</span> max.)
    3636      </div>
     37      <br />
    3738    </div>
    38 
    39     <br />
    4039  </td>
    4140</tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r11535 r11567  
    740740    grok.template('clearanceeditpage')
    741741    label = _('Manage clearance data')
     742    deletion_warning = _('Are you sure?')
    742743    pnav = 4
    743744
Note: See TracChangeset for help on using the changeset viewer.