- Timestamp:
- 11 Dec 2007, 15:40:35 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Students.py
r2912 r2920 594 594 """compose title""" 595 595 content = self.getContent() 596 session_str = self.portal_vocabularies.sessions.get(content.session) 596 session_id = content.session 597 try: 598 y = int(session_id[2:]) 599 except: 600 return "Accommodation Data for Session %s" % session_id 601 session_str = self.portal_vocabularies.sessions.get(y) 597 602 #return "Accommodation Data for %s %s" % (content.firstname,content.lastname) 598 603 return "Accommodation Data for Session %s" % session_str -
WAeUP_SRP/base/skins/cps_custom/main_template_popup.pt
r2918 r2920 1 <metal:block define-macro="master" tal:define="2 showthirdcol showthirdcol|python:1;1 <metal:block define-macro="master" 2 tal:define="showthirdcol showthirdcol|python:1; 3 3 emptybody emptybody|request/emptybody|nothing; 4 mtool here/portal_membership; 5 4 6 utool nocall:here/portal_url; 5 7 atool here/portal_actions; 6 mtool here/portal_membership;7 8 ttool here/portal_trees; 8 9 wtool here/portal_workflow; 10 ptool here/portal_cpsportlets; 9 11 context_url python:here.getContextUrl(utool=utool); 10 base_url python:utool.getBaseUrl();11 12 here_url here/absolute_url; 13 base_url here/getBaseUrl; 12 14 static_dir here/portal_properties/static_dir; 13 15 static_base_url string:${here/getBaseUrl}${static_dir}; 14 15 16 here_url python:here.absolute_url();17 16 member mtool/getAuthenticatedMember; 18 17 isAnon mtool/isAnonymousUser; 18 isHomeless python:isAnon or member.getProperty('homeless', 0); 19 isHomeless python:(isHomeless == '0' and [0] or [isHomeless])[0]; 19 20 actions python:atool.listFilteredActionsFor(here); 20 21 wf_state python:wtool.getInfoFor(here,'review_state',''); 21 uname python: isAnon and 'Guest' or member.getUserName();22 checkPerm nocall: mtool/checkPermission;22 uname python: isAnon and 'Guest' or member.getUserName(); 23 checkPerm nocall: mtool/checkPermission; 23 24 cpsmcat nocall:here/translation_service; 24 25 locale here/translation_service/getSelectedLanguage; 25 26 in_ws here/isInWorkspace; 26 "><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 27 waeup_skin here/get_waeup_skin; 28 student_theme python:test(waeup_skin == 'WAeUP_Student',1,0); 29 navigation_slot python:test(student_theme,'student_navigation_slot','navigation_slot'); 30 object_tabs python:test(student_theme,'student_object_slot','staff_object_slot'); 31 32 "> 33 34 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 27 35 <html xmlns="http://www.w3.org/1999/xhtml" 28 36 tal:attributes="lang locale; xml:lang locale"> … … 34 42 <metal:block fill-slot="head_slot"><metal:block define-slot="head_slot" 35 43 /></metal:block> 36 <metal:block fill-slot="style_slot"><metal:block define-slot="style_slot" 37 /></metal:block> 44 38 45 <metal:block fill-slot="javascript_head_slot"><metal:block 39 46 define-slot="javascript_head_slot" -
WAeUP_SRP/base/skins/waeup_layout/layout_application_edit.pt
r2581 r2920 2 2 isStudent context/isStudent; 3 3 info context/getApplicationInfo; 4 app_email info/app_doc/app_email"> 4 app_email info/app_doc/app_email|nothing; 5 app_passport info/has_passport; 6 "> 5 7 6 8 <metal:block tal:condition="isStaff"> … … 10 12 11 13 <metal:block define-macro="application_student_edit" 12 tal:condition="python:isStudent and not app_email"14 tal:condition="python:isStudent" 13 15 tal:define="layout options/layout; 14 16 ds options/datastructure; … … 19 21 proceed options/proceed|nothing; 20 22 widgets python:context.getRenderedWidgets(layout); 21 fields python:( 'app_email', 22 'app_mobile',)"> 23 widget_email widgets/app_email|nothing; 24 widget_passport widgets/passport|nothing; 25 "> 23 26 <table class="layoutDefault" summary="Form layout" 24 tal:condition="layout/rows">27 > 25 28 26 <tr tal:condition=" widgets/app_email|nothing"27 tal:define="cell widget s/app_email|nothing;">29 <tr tal:condition="python: widget_email and not app_email" 30 tal:define="cell widget_email"> 28 31 <tal:block tal:define="widget cell/widget; 29 32 wid widget/getWidgetId; … … 56 59 </tal:block> 57 60 </tr> 61 <tr tal:condition="python: widget_passport and not app_passport" 62 tal:define="cell widget_passport"> 63 <tal:block tal:define="widget cell/widget; 64 wid widget/getWidgetId; 65 err python:ds.getError(wid); 66 err_mapping python:ds.getErrorMapping(wid); 67 is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes); 68 tooltip_id python:wid + '_help'; 69 widget_css_class widget/widget_css_class|nothing; 70 css_class python:test(err, 'row error','row')" 71 > 72 <div tal:attributes="class widget_css_class; 73 id python:widget.getHtmlWidgetId()+'_widget';" 74 > 75 <td> 76 <div class="label" tal:condition="widget/label_edit" 77 tal:attributes="class python:test(is_required, 'label required','label')"> 78 <label tal:content="widget/label_edit" 79 tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: 80 81 <button type="button" class="tooltipControl" 82 tal:condition="widget/help" 83 tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> 84 </div> 85 </td> 86 <td> 87 <span class="field"> 88 <div tal:replace="structure cell/widget_rendered"/> 89 </span> 90 <div class="tooltipArea" style="visibility: hidden;" 91 tal:condition="widget/help" 92 tal:attributes="id tooltip_id; 93 onclick python:'showElement(false, \'%s\')' % tooltip_id;" 94 > 95 <tal:block tal:content="widget/help">This is the help for this field 96 </tal:block> 97 </div> 98 <tal:block condition="err"> 99 <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> 100 <br /><em style="color: red" 101 tal:content="msg">err</em> 102 </tal:block> 103 </tal:block> 104 </td> 105 </div> 106 </tal:block> 107 </tr> 58 108 </table> 59 109 </metal:block> -
WAeUP_SRP/base/skins/waeup_student/admission_form.pt
r2692 r2920 1 1 <metal:html tal:define="info context/getStudentInfo; 2 app_email info/app_doc/app_email|nothing"> 2 app_email info/app_doc/app_email|nothing; 3 app_passport info/has_passport; 4 data_complete python:app_passport and app_email; 5 "> 3 6 <span tal:condition="not: info"> 4 7 <span tal:content="here/illegal_view" /> … … 77 80 (cpsmcat('Confirm that you want to raise an objection.'), )" 78 81 /> 79 <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and not app_email" type="submit" name="application_edit:method"82 <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and not data_complete" type="submit" name="application_edit:method" 80 83 class="context" value="Continue" 81 84 /> 82 <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and app_email" type="submit" name="start_clearance:method"85 <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and data_complete" type="submit" name="start_clearance:method" 83 86 class="context" value="Continue" 84 87 /> -
WAeUP_SRP/base/skins/waeup_student/application_edit.py
r2579 r2920 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters=REQUEST, cpsdocument_edit_ button=None, cpsdocument_edit_and_view_button=None, action=None7 ##parameters=REQUEST, cpsdocument_edit_and_view_button=None, action=None, portal_status_message='' 8 8 ##title= 9 9 # $Id$ … … 18 18 logger = logging.getLogger('Skins.application_edit') 19 19 20 # Until ajax posts directly to its own script... 21 ##if 'ajax_edit' in REQUEST.form: 22 ## return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster) 20 psm = "" 21 args = {} 23 22 24 # Check flexible controls 25 #context.editLayouts(REQUEST=REQUEST) 23 info = context.getApplicationInfo() 26 24 27 # Validate the document and write it if it's valid 28 # (We don't call getEditableContent here, validate does it when needed.) 29 info = context.getApplicationInfo() 25 student = info['student'] 30 26 31 27 if info is None: … … 33 29 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 34 30 35 student = info['student'] 31 if info['has_passport'] and info['app_doc'].app_email: 32 logger.info('%s proceeded to start clearance' % (info['id'])) 33 action = "/start_clearance" 34 base_url = student.absolute_url() 35 url = base_url + action 36 return REQUEST.RESPONSE.redirect(url) 37 elif not cpsdocument_edit_and_view_button: 38 action = "/application_edit_form" 39 base_url = student.absolute_url() 40 #url = base_url + action 41 if portal_status_message: 42 args['portal_status_message'] = portal_status_message 43 url = base_url + action + '?' + urlencode(args) 44 else: 45 url = base_url + action 46 return REQUEST.RESPONSE.redirect(url) 47 48 49 36 50 app = info['app'] 37 51 app_doc = info['app_doc'] … … 43 57 use_session=False) 44 58 45 psm = "" 46 args = {} 47 action = "/application_edit_form" 59 60 action = "/application_edit" 48 61 base_url = app.absolute_url() 49 62 50 63 if is_valid: 51 if cpsdocument_edit_button: 52 if app_doc.passport is not None: 53 args['portal_status_message'] = 'You successfully uploaded your passport picture!' 54 else: 55 args['portal_status_message'] = "You didn't upload a passport picture!" 56 elif cpsdocument_edit_and_view_button: 57 if 1: ## app_doc.passport is not None: 58 logger.info('%s proceeded to start clearance' % (info['id'])) 59 action = "/start_clearance" 60 base_url = student.absolute_url() 61 url = base_url + action 62 return REQUEST.RESPONSE.redirect(url) 63 else: 64 args['portal_status_message'] = "You didn't upload a passport picture!" 65 if args: 66 url = base_url + action + '?' + urlencode(args) 64 args['portal_status_message'] = "You didn't upload all required data!" 65 67 66 else: 68 url = base_url + action 69 REQUEST.RESPONSE.redirect(url) 67 args['portal_status_message'] = "Please correct your error!" 68 69 url = base_url + action + '?' + urlencode(args) 70 71 72 73 return REQUEST.RESPONSE.redirect(url) -
WAeUP_SRP/base/skins/waeup_student/application_edit_form.pt
r2581 r2920 12 12 form_action string:application_edit; 13 13 edition python:True; 14 session2006 python:True; 14 app_email info/app_doc/app_email|nothing; 15 app_passport info/has_passport; 16 data_complete python:app_passport and app_email; 15 17 metadata nothing; 16 18 "> … … 33 35 <br /> 34 36 <input type="submit" class="standalone" 35 name="cpsdocument_edit_button"36 value="Save & Return Later"37 id="cpsdocument_edit_button"38 tal:condition="not:session2006" />39 <input type="submit" class="standalone"40 name="cpsdocument_edit_and_view_button"41 value="Save & Apply"42 id="cpsdocument_edit_and_view_button"43 tal:condition="not:session2006" />44 <input type="submit" class="standalone"45 37 name="cpsdocument_edit_and_view_button" 46 38 value="Save & Continue" 47 39 id="cpsdocument_edit_and_view_button" 48 tal:condition="session2006"/>40 /> 49 41 </form> 50 42 </metal:main> -
WAeUP_SRP/base/skins/waeup_student/getApplicationInfo.py
r2335 r2920 36 36 student_id = member_id 37 37 38 info['has_passport'] = context.waeup_tool.picturesExist(('passport',), student_id) 38 39 39 40 students_object = context.portal_url.getPortalObject().campus.students -
WAeUP_SRP/base/skins/waeup_student/getStudentInfo.py
r2407 r2920 65 65 info['app'] = student.application 66 66 info['app_doc'] = student.application.getContent() 67 info['has_passport'] = context.waeup_tool.picturesExist(('passport',), student_id) 67 68 68 69 course = getattr(student,'study_course',None)
Note: See TracChangeset for help on using the changeset viewer.