Changeset 7084
- Timestamp:
- 11 Nov 2011, 14:44:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7081 r7084 732 732 self.wf_info = IWorkflowInfo(self.context) 733 733 self.max_upload_size = string_from_bytes(MAX_UPLOAD_SIZE) 734 self.passport_changed = None 734 735 upload = self.request.form.get('form.passport', None) 735 736 if upload: 736 737 # We got a fresh upload 737 passport_changed = handle_img_upload(upload, self.context, self) 738 self.passport_changed = handle_img_upload( 739 upload, self.context, self) 738 740 return 739 741 … … 760 762 @grok.action('Save') 761 763 def save(self, **data): 764 if self.passport_changed is False: # False is not None! 765 return # error during image upload. Ignore other values 762 766 changed_fields = self.applyData(self.context, **data) 763 767 changed_fields = changed_fields.values() 764 768 fields_string = '+'.join( 765 769 ' + '.join(str(i) for i in b) for b in changed_fields) 770 if self.passport_changed: 771 fields_string += ' + passport' 766 772 self.context._p_changed = True 767 773 form = self.request.form … … 810 816 @grok.action('Save') 811 817 def save(self, **data): 818 if self.passport_changed is False: # False is not None! 819 return # error during image upload. Ignore other values 812 820 self.applyData(self.context, **data) 813 821 self.context._p_changed = True … … 817 825 @grok.action('Final Submit') 818 826 def finalsubmit(self, **data): 827 if self.passport_changed is False: # False is not None! 828 return # error during image upload. Ignore other values 819 829 self.applyData(self.context, **data) 820 830 self.context._p_changed = True
Note: See TracChangeset for help on using the changeset viewer.