- Timestamp:
- 17 Jun 2012, 12:13:45 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r8372 r8739 114 114 >>> print browser.contents 115 115 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 116 ... Settings havebeen saved...116 ...Form has been saved... 117 117 ... 118 118 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r8651 r8739 65 65 from waeup.kofa.widgets.htmlwidget import HTMLDisplayWidget 66 66 from waeup.kofa.authentication import get_principal_role_manager 67 from waeup.kofa.utils.helpers import get_user_account 67 from waeup.kofa.utils.helpers import get_user_account, msave 68 68 69 69 grok.context(IKofaObject) … … 108 108 _('Local role successfully removed: ${a}', 109 109 mapping = {'a':', '.join(deleted)})) 110 ob_class = view.__implemented__.__name__.replace('waeup.kofa.','') 111 grok.getSite().logger.info( 112 '%s - removed: %s' % (ob_class, ', '.join(deleted))) 110 113 view.redirect(view.url(view.context, u'@@manage')+'?tab%s' % tab) 111 114 return … … 139 142 view.flash(_('Successfully removed: ${a}', 140 143 mapping = {'a': ', '.join(deleted)})) 144 ob_class = view.__implemented__.__name__.replace('waeup.kofa.','') 145 grok.getSite().logger.info( 146 '%s - removed: %s' % (ob_class, ', '.join(deleted))) 141 147 if tab: 142 148 view.redirect(view.url(view.context, redirect)+'?tab%s' % tab) … … 414 420 self.flash(_('User account ${a} successfully deleted.', 415 421 mapping = {'a': userid})) 422 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 423 self.context.__parent__.logger.info( 424 '%s - removed: %s' % (ob_class, userid)) 416 425 417 426 def getLocalRoles(self, account): … … 471 480 self.flash(_('User account ${a} successfully added.', 472 481 mapping = {'a': name})) 482 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 483 self.context.__parent__.logger.info( 484 '%s - added: %s' % (ob_class, name)) 473 485 except KeyError: 474 486 self.status = self.flash('The userid chosen already exists ' … … 517 529 fields_string = ' + '.join(changed_fields) 518 530 if fields_string: 531 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 519 532 self.context.__parent__.logger.info( 520 'User account %s edited: %s' % (self.context.name,fields_string)) 533 '%s - %s edited: %s' % ( 534 ob_class, self.context.name, fields_string)) 521 535 self.flash(_('User settings have been saved.')) 522 536 return … … 675 689 @action(_('Save'), style='primary') 676 690 def save(self, **data): 677 self.applyData(self.context, **data)691 msave(self, **data) 678 692 self.context.frontpage_dict = self._frontpage() 679 self.flash(_('Settings have been saved.'))680 693 return 681 694 … … 723 736 try: 724 737 self.context.addSessionConfiguration(sessionconfiguration) 738 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 739 self.context.__parent__.logger.info( 740 '%s - added: %s' % ( 741 ob_class, sessionconfiguration.academic_session)) 725 742 except KeyError: 726 743 self.flash(_('The session chosen already exists.')) … … 751 768 @action(_('Save'), style='primary') 752 769 def save(self, **data): 753 self.applyData(self.context, **data) 754 self.flash(_('Settings have been saved.')) 770 msave(self, **data) 755 771 self.redirect(self.url(self.context.__parent__, '@@index')+'?tab2') 756 772 return … … 800 816 self.flash(_('Successfully deleted: ${a}', 801 817 mapping = {'a': ', '.join(deleted)})) 802 logger.info('%s: Deleted files %s' % ( 803 self.request.principal.id, ', '.join(deleted))) 818 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 819 self.context.logger.info( 820 '%s - deleted: %s' % (ob_class, ', '.join(deleted))) 804 821 return 805 822 … … 832 849 os.chmod(target, 0664) 833 850 logger = self.context.logger 834 logger.info('%s: Uploaded file %s' % (835 self.request.principal.id, target))851 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 852 logger.info('%s - uploaded: %s' % (ob_class, target)) 836 853 except IOError: 837 854 self.flash('Error while uploading file. Please retry.') … … 869 886 870 887 def render(self): 888 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 889 self.context.logger.info( 890 '%s - downloaded: %s' % (ob_class, self.filename)) 871 891 self.response.setHeader( 872 892 'Content-Type', 'text/csv; charset=UTF-8') … … 1263 1283 grok.name('manage') 1264 1284 grok.template('datacentermanagepage') 1265 grok.require('waeup.manage DataCenter')1285 grok.require('waeup.managePortal') 1266 1286 label = _('Edit data center settings') 1267 1287 pnav = 0 … … 1292 1312 if newpath: 1293 1313 self.flash(_('New storage path succefully set.')) 1314 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1315 self.context.logger.info( 1316 '%s - storage path set: %s' % (ob_class, newpath)) 1294 1317 self.redirect(self.url(self.context)) 1295 1318 return … … 1316 1339 self.url(self.context, 'export.csv') + '?exporter=%s' % exporter) 1317 1340 return 1341 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1342 self.context.logger.info( 1343 '%s - exported: %s' % (ob_class, exporter)) 1318 1344 exporter = getUtility(ICSVExporter, name=exporter) 1319 1345 csv_data = exporter.export_all(grok.getSite()) … … 1524 1550 @action(_('Save'), style='primary') 1525 1551 def save(self, **data): 1526 self.applyData(self.context, **data) 1527 self.flash(_('Form has been saved.')) 1528 return 1552 return msave(self, **data) 1529 1553 1530 1554 @action(_('Cancel'), validator=NullValidator) … … 1703 1727 @action(_('Save'), style='primary') 1704 1728 def save(self, **data): 1705 self.applyData(self.context, **data) 1706 self.flash('Form has been saved.') 1707 return 1729 return msave(self, **data) 1708 1730 1709 1731 @jsaction(_('Remove selected courses')) … … 1846 1868 @action(_('Save'), style='primary') 1847 1869 def save(self, **data): 1848 self.applyData(self.context, **data) 1849 self.flash(_('Form has been saved.')) 1850 return 1851 1852 #@action('Save and return') 1853 #def saveAndReturn(self, **data): 1854 # self.applyData(self.context, **data) 1855 # self.redirect(self.url(self.context)) 1856 # return 1870 return msave(self, **data) 1857 1871 1858 1872 @action(_('Cancel'), validator=NullValidator) … … 1918 1932 @action(_('Save'), style='primary') 1919 1933 def save(self, **data): 1920 self.applyData(self.context, **data) 1921 self.flash(_('Form has been saved.')) 1922 return 1934 return msave(self, **data) 1923 1935 1924 1936 @jsaction(_('Remove selected course referrers')) … … 2023 2035 parent = self.context.__parent__ 2024 2036 if self.context.level == data['level']: 2025 self.applyData(self.context, **data)2037 msave(self, **data) 2026 2038 else: 2027 2039 # The level changed. We have to create a new certcourse as … … 2031 2043 parent.addCourseRef(**data) 2032 2044 parent.delCourseRef(data['course'].code, level=old_level) 2033 self.flash(_('Form has been saved.'))2045 self.flash(_('Form has been saved.')) 2034 2046 self.redirect(self.url(parent)) 2035 2047 return -
main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.py
r7819 r8739 43 43 description=description, 44 44 email=email, phone=phone, roles=roles) 45 self.logger.info('User account %s added.' % name)45 #self.logger.info('User account %s added.' % name) 46 46 47 47 def addAccount(self, account): … … 49 49 """ 50 50 self[account.name] = account 51 self.logger.info('User account %s added.' % account.name)51 #self.logger.info('User account %s added.' % account.name) 52 52 53 53 def delUser(self, name): … … 58 58 if name in self.keys(): 59 59 del self[name] 60 self.logger.info('User account %s deleted.' % name)60 #self.logger.info('User account %s deleted.' % name) -
main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
r8737 r8739 692 692 fields_string = ' + '.join(changed_fields) 693 693 view.flash(_('Form has been saved.')) 694 ob_class = view.__implemented__.__name__.replace('waeup.kofa.','') 694 695 if fields_string: 695 view.context.writeLogMessage(view, 'saved: %s' % fields_string)696 grok.getSite().logger.info('%s - saved: %s' % (ob_class, fields_string)) 696 697 return
Note: See TracChangeset for help on using the changeset viewer.