Changeset 16190 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 6 Aug 2020, 10:49:02 (4 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r16129 r16190 230 230 def addApplicantsContainer(self, **data): 231 231 year = data['year'] 232 if not data['container_number'] and not data['year']: 233 self.flash( 234 _('You must select either Year of Entrance or Container Number.'), 235 type='warning') 236 return 232 237 if not data['container_number']: 233 238 code = u'%s%s' % (data['prefix'], year) … … 235 240 code = u'%s%s' % (data['prefix'], data['container_number']) 236 241 apptypes_dict = getUtility(IApplicantsUtils).APP_TYPES_DICT 237 title = apptypes_dict[data['prefix']][0] 238 title = u'%s %s/%s' % (title, year, year + 1) 242 title = u'%s' % apptypes_dict[data['prefix']][0] 243 if year: 244 title = u'%s %s/%s' % (title, year, year + 1) 239 245 if code in self.context.keys(): 240 246 self.flash( 241 247 _('An applicants container for the same application ' 242 'type and entrance year exists already in the database.'), 248 'type and entrance year or container number ' 249 'already exists in the database.'), 243 250 type='warning') 244 251 return -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r16186 r16190 221 221 year = schema.Choice( 222 222 title = _(u'Year of Entrance'), 223 required = True,223 required = False, 224 224 values = year_range(), 225 readonly = True,225 readonly = False, 226 226 ) 227 227 … … 323 323 year = schema.Choice( 324 324 title = _(u'Year of Entrance'), 325 required = True,325 required = False, 326 326 values = year_range(), 327 327 readonly = False, -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r16120 r16190 364 364 name="form.application_category").value = ['basic'] 365 365 self.browser.getControl("Add applicants container").click() 366 self.assertTrue(' exists alreadyin the database'366 self.assertTrue('already exists in the database' 367 367 in self.browser.contents) 368 368 # Managers can add containers with prefix+number code instead of
Note: See TracChangeset for help on using the changeset viewer.