Changeset 1456 for WAeUP_SRP/trunk/skins
- Timestamp:
- 21 Feb 2007, 16:53:14 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
r1435 r1456 77 77 phone = ds.get('phone') 78 78 student_id = context.getStudentId() 79 app_doc = context.application.getContent() 80 jamb_sex = 'M' 81 if ds.get('sex'): 82 jamb_sex = 'F' 83 79 #app_doc = context.application.getContent() 80 #jamb_sex = 'M' 81 #if ds.get('sex'): 82 # jamb_sex = 'F' 84 83 # originally imported data must be kept; app_doc should not be changed here 85 84 #app_doc.edit(mapping={'jamb_lastname': name, 86 85 # 'jamb_sex': jamb_sex 87 86 # }) 88 89 87 context.students_catalog.modifyRecord(id = student_id, 90 88 name = name, -
WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py
r1167 r1456 1 ## Script (Python) "personal_edit"2 ##bind container=container3 ##bind context=context4 ##bind namespace=5 ##bind script=script6 ##bind subpath=traverse_subpath7 ##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None8 ##title=9 # $Id: application_edit.py 1071 2006-12-16 15:53:13Z joachim $10 """11 """12 wftool = context.portal_workflow13 from urllib import urlencode14 from Products.CPSDocument.utils import getFormUidUrlArg15 import DateTime16 current = DateTime.DateTime()17 import logging18 logger = logging.getLogger('Student.Personal.Edit')19 20 info = context.getPersonalInfo()21 22 if info is None:23 logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))24 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())25 26 student = info['student']27 per = info['per']28 per_doc = info['per_doc']29 state = info['review_state']30 is_valid, ds = per_doc.validate(request=REQUEST,31 schema_id = 'student_personal',32 layout_id = 'student_personal_fe',33 proxy=per,34 use_session=True)35 36 psm = ""37 args = {}38 action = "/personal_edit_form"39 base_url = per.absolute_url()40 41 if is_valid:42 if cpsdocument_edit_button:43 logger.info('"%s", "edited personal data"' % (info['id']))44 #action = ""45 #base_url = student.absolute_url()46 #url = base_url + action47 psm = 'psm_content_changed'48 else:49 psm = 'psm_content_error'50 args = getFormUidUrlArg(REQUEST)51 52 args['portal_status_message'] = psm53 url = base_url + action + '?' + urlencode(args)54 REQUEST.RESPONSE.redirect(url)
Note: See TracChangeset for help on using the changeset viewer.