Changeset 488 for WAeUP_SRP/trunk/skins
- Timestamp:
- 7 Sep 2006, 12:34:56 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/default.css.dtml
r487 r488 341 341 div.label { 342 342 font-weight: bold; 343 float: rigth;344 clear: none;345 343 } 346 344 347 345 div.field { 348 346 padding: 0px 0px 0px 0px; 349 float: left;350 347 text-align: left; 351 clear: none;352 348 } 353 349 -
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r486 r488 18 18 pr = context.portal_registration 19 19 20 prefix = 'APP'21 20 res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe', 22 21 schema_id= 'student_application', 23 22 context=context, 24 23 mapping=validate and REQUEST, 25 ob={ 'app_ac_prefix': prefix},24 ob={}, 26 25 layout_mode='create', 27 26 formaction = "apply_admission", … … 31 30 return context.application_pin_form(rendered = res, 32 31 psm = "Please correct your input.", 33 #psm = " psm : #%s#" % (psm,),32 #psm = "%s, %s" % (psm,ds), 34 33 firstlayout = True, 35 34 lastlayout = True, … … 45 44 elif psm == 'valid': 46 45 jamb_id = ds.get('jamb_reg_no') 47 catalog = context.portal_catalog 48 search = catalog({'meta_type': 'StudentApplication', 49 'jamb_reg_no': jamb_id 50 }) 51 52 if len(search) < 1: 53 psm = "JAMB record %s not found." % (jamb_id) 46 student = context.getContent().getStudentByRegNo(jamb_id) 47 if student is None: 48 psm = "JAMB record %s not accessible." % (jamb_id) 54 49 return context.application_pin_form(rendered = res, 55 50 psm = psm, 51 #psm = "%s, %s" % (psm,ds), 56 52 ds = ds, 57 53 ) 58 application = search[0].getObject() 59 student = application.aq_parent 54 application = student.application 60 55 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 61 56 #student.invokeFactory('StudentClearance','clearance') … … 80 75 student.personal.getContent().edit(mapping = dp) 81 76 da = {} 82 da['app_ac_prefix'] = prefix83 da['app_ac_batch_no'] = ds.get('app_ac_batch_no')84 77 da['app_ac_pin'] = ds.get('app_ac_pin') 85 78 da['app_ac_date'] = current -
WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_create_do.py
r486 r488 5 5 6 6 Datamodel may be examined to create a suitable id. 7 8 Returns the created object (usually a proxy).9 7 """ 10 8 from Products.CMFCore.utils import getToolByName 11 9 12 id = datamodel.get('prefix').upper() 13 datamodel.set('prefix',id) 14 bl = context.portal_catalog({'meta_type': "ScratchCardBatch"}) 15 b_ids = [b.getId(), for b in bl] 10 prefix = datamodel.get('prefix').upper() 11 datamodel.set('prefix',prefix) 12 bl = context.portal_catalog({'meta_type': "ScratchCardBatch",}) 13 b_ids = [] 14 for b in bl: 15 b_ids.append(b.getId) 16 16 next = 1 17 while "%(prefix)s_%(next)d" % vars() in b_ids:17 while b_ids and "%s_%d" % (prefix,next) in b_ids: 18 18 next += 1 19 id = "%(prefix)s_%(next)d" % vars() 20 ##if not id: 21 ## id = 'my ' + type_name 22 ##id = context.computeId(compute_from=id) # XXX shouldn't use a skin 23 ## 24 language = datamodel.get('Language') 25 if not language: 26 ts = getToolByName(context, 'translation_service') 27 language = ts.getSelectedLanguage() 19 id = "%s_%d" % (prefix,next) 20 datamodel.set('batch_no',next) 21 ##language = datamodel.get('Language') 22 ##if not language: 23 ## ts = getToolByName(context, 'translation_service') 24 ## language = ts.getSelectedLanguage() 28 25 29 26 # Datamodel is passed so that flexti can initialize the object. 30 27 new_id = context.invokeFactory(type_name, id, datamodel=datamodel, 31 language=language,32 28 ) 33 29 if new_id is not None: -
WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_created.py
r486 r488 1 ##parameters= 1 ## Script (Python) "cpsdocument_created" 2 ##bind container=container 3 ##bind context=context 4 ##bind namespace= 5 ##bind script=script 6 ##bind subpath=traverse_subpath 7 ##parameters=object=None 8 ##title= 9 ## 2 10 # $Id$ 3 11 if object is not None: 12 batch = object 13 batch.getContent().makePins() 4 14 return
Note: See TracChangeset for help on using the changeset viewer.