Changeset 8735 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 17 Jun 2012, 06:42:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
r8633 r8735 38 38 from zope.security.management import getInteraction 39 39 from zope.pluggableauth.interfaces import IAuthenticatorPlugin 40 from waeup.kofa.interfaces import MessageFactory as _ 40 41 41 42 BUFSIZE = 8 * 1024 … … 682 683 writer.writerow(row) 683 684 return tmp_path 685 686 # Save function used for save methods in pages 687 def msave(view, **data): 688 changed_fields = view.applyData(view.context, **data) 689 # Turn list of lists into single list 690 if changed_fields: 691 changed_fields = reduce(lambda x,y: x+y, changed_fields.values()) 692 # Inform catalog if certificate has changed 693 # (applyData does this only for the context) 694 if 'certificate' in changed_fields: 695 notify(grok.ObjectModifiedEvent(view.context.getStudent())) 696 fields_string = ' + '.join(changed_fields) 697 view.flash(_('Form has been saved.')) 698 if fields_string: 699 view.context.writeLogMessage(view, 'saved: %s' % fields_string) 700 return
Note: See TracChangeset for help on using the changeset viewer.