Ignore:
Timestamp:
14 Nov 2011, 10:01:17 (13 years ago)
Author:
Henrik Bettermann
Message:

Reorganize file upload. Each viewlet gets an upload and a delete button and writes its own log message. Thus there is one line per file deletion or file upload in the log file. The save action does no longer upload the files.

It works perfectly in the UI but I have still some problems with the browser test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7107 r7108  
    7070        changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
    7171    fields_string = ' + '.join(changed_fields)
    72     view.context._p_changed = True
     72    #view.context._p_changed = True
    7373    view.flash('Form has been saved.')
    7474    if fields_string:
    75         write_log_message(view, 'saved: % s' % fields_string)
     75        write_log_message(view, 'saved: %s' % fields_string)
    7676    return
    7777
     
    470470    title = 'Clearance Data'
    471471    pnav = 4
    472     files_changed = []
    473     files_deleted = []
    474472
    475473    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
     
    479477        return super(StudentClearanceManageFormPage, self).update()
    480478
    481     @grok.action('Save')
     479    @grok.action('Save (no upload)')
    482480    def save(self, **data):
    483481        msave(self, **data)
Note: See TracChangeset for help on using the changeset viewer.