- Timestamp:
- 30 May 2011, 08:17:42 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
r6244 r6246 466 466 <!DOCTYPE html PUBLIC... 467 467 ... 468 ...Processing of 1 rows failed !...468 ...Processing of 1 rows failed... 469 469 ...Successfully processed 1 rows... 470 470 ... -
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r6245 r6246 91 91 >>> print browser.contents 92 92 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 93 ...<li class="message">Error: xx@yy is not a valid email address !</li>93 ...<li class="message">Error: xx@yy is not a valid email address.</li> 94 94 ... 95 95 … … 223 223 >>> print browser.contents 224 224 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 225 ...< div>The code chosen already exists in the database</div>225 ...<li class="message">The code chosen already exists in the database.</li> 226 226 ... 227 227 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r6245 r6246 21 21 from zope.component import ( 22 22 getUtility, createObject,getAllUtilitiesRegisteredFor) 23 from zope.component.interfaces import Invalid23 #from zope.component.interfaces import Invalid 24 24 from zope.event import notify 25 25 from zope.session.interfaces import ISession … … 63 63 child_id = form['role_id'] 64 64 else: 65 view.flash('No local role selected !')65 view.flash('No local role selected.') 66 66 view.redirect(view.url(view.context, '@@manage')+'#tab-%s' % tab) 67 67 return … … 111 111 self.redirect(self.camefrom) 112 112 return 113 self.flash('You entered wrong credentials !')113 self.flash('You entered wrong credentials.') 114 114 115 115 class LoginStaffPage(LoginPage): … … 296 296 description=description, roles=roles) 297 297 except KeyError: 298 self.status = Invalid('The userid chosen already exists '299 'in the database ')298 self.status = self.flash('The userid chosen already exists ' 299 'in the database.') 300 300 return 301 301 self.redirect(self.url(self.context)) … … 396 396 regno =form['regno'] 397 397 if not (fullname and email and descr): 398 self.flash('Error: All fields must be filled !')398 self.flash('Error: All fields must be filled.') 399 399 return 400 400 if not re.match("^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", 401 401 email): 402 self.flash('Error: %s is not a valid email address !' % email)402 self.flash('Error: %s is not a valid email address.' % email) 403 403 return 404 404 if regno == 'zope.anybody': … … 499 499 def update(self, filename=None, select=None, cancel=None): 500 500 if cancel is not None: 501 self.flash('Import aborted ')501 self.flash('Import aborted.') 502 502 self.redirect(self.url(self.context)) 503 503 return … … 575 575 return 576 576 if cancel is not None: 577 self.flash('Import aborted ')577 self.flash('Import aborted.') 578 578 self.redirect(self.url(self.context)) 579 579 return … … 742 742 743 743 if self.warn_num: 744 self.flash('Processing of %d rows failed !' % self.warn_num)744 self.flash('Processing of %d rows failed.' % self.warn_num) 745 745 self.flash('Successfully processed %s rows' % ( 746 746 linenum - (self.warn_num))) … … 906 906 child_id = form['val_id'] 907 907 else: 908 self.flash('No faculty selected !')908 self.flash('No faculty selected.') 909 909 self.redirect(self.url(self.context, '@@manage')+'#tab-1') 910 910 return … … 953 953 self.context.addFaculty(faculty) 954 954 except KeyError: 955 self.status = Invalid('The name chosen already exists '956 'in the database ')955 self.status = self.flash('The code chosen already exists ' 956 'in the database.') 957 957 return 958 958 self.redirect(self.url(self.context, u'@@manage')+'#tab-1') … … 1031 1031 child_id = form['val_id'] 1032 1032 else: 1033 self.flash('No department selected !')1033 self.flash('No department selected.') 1034 1034 self.redirect(self.url(self.context, '@@manage')+'#tab-2') 1035 1035 return … … 1093 1093 self.context.addDepartment(department) 1094 1094 except KeyError: 1095 self.status = Invalid('The code chosen already exists '1096 'in the database ')1095 self.status = self.flash('The code chosen already exists ' 1096 'in the database.') 1097 1097 return 1098 1098 self.redirect(self.url(self.context, u'@@manage')+'#tab-2') … … 1209 1209 child_id = form['val_id'] 1210 1210 else: 1211 self.flash('No course selected !')1211 self.flash('No course selected.') 1212 1212 self.redirect(self.url(self.context, '@@manage')+'#tab-2') 1213 1213 return … … 1233 1233 child_id = form['val_id'] 1234 1234 else: 1235 self.flash('No certificate selected !')1235 self.flash('No certificate selected.') 1236 1236 self.redirect(self.url(self.context, '@@manage')+'#tab-3') 1237 1237 return … … 1472 1472 child_id = form['val_id'] 1473 1473 else: 1474 self.flash('No course referrer selected !')1474 self.flash('No course referrer selected.') 1475 1475 self.redirect(self.url(self.context, '@@manage')+'#tab-2') 1476 1476 return … … 1521 1521 self.context.addCourseRef(**data) 1522 1522 except KeyError: 1523 self.status = Invalid('The chosen course referrer is already '1524 'part of this certificate ')1523 self.status = self.flash('The chosen course referrer is already ' 1524 'part of this certificate.') 1525 1525 return 1526 1526 self.redirect(self.url(self.context, u'@@manage')+'#tab-2')
Note: See TracChangeset for help on using the changeset viewer.