- Timestamp:
- 5 Sep 2006, 13:20:18 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 added
- 9 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts.xml
r472 r479 11 11 <object name="faculty" meta_type="CPS Layout"/> 12 12 <object name="student" meta_type="CPS Layout"/> 13 <object name="student_check_pin" meta_type="CPS Layout"/>14 13 <object name="student_study_course" meta_type="CPS Layout"/> 15 14 <object name="student_application" meta_type="CPS Layout"/> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
r478 r479 1 1 <?xml version="1.0"?> 2 <object name="student_application " meta_type="CPS Layout">2 <object name="student_application_fe" meta_type="CPS Layout"> 3 3 <property name="layout_create_method"></property> 4 4 <property name="layout_edit_method"></property> … … 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 9 <widget name="app_ac_batch_no" meta_type="String Widget"> 10 <property name="title">Batch No</property> 11 <property name="fields"> 12 <element value="app_ac_batch_no"/> 13 </property> 14 <property name="label">Batch</property> 15 <property name="label_edit">Batch</property> 16 <property name="readonly_layout_modes"/> 17 <property name="hidden_layout_modes"/> 18 <property name="hidden_readonly_layout_modes"/> 19 <property name="display_width">2</property> 20 <property name="size_max">2</property> 21 </widget> 22 <widget name="app_ac_batch_no_old" meta_type="Int Widget"> 23 <property name="title">Batch No</property> 24 <property name="fields"> 25 <element value="app_ac_batch_no"/> 26 </property> 27 <property name="label">Batch</property> 28 <property name="label_edit">Batch</property> 29 <property name="readonly_layout_modes"/> 30 <property name="hidden_layout_modes"/> 31 <property name="hidden_readonly_layout_modes"/> 32 <property name="is_limited">True</property> 33 <property name="min_value">1</property> 34 <property name="max_value">99</property> 35 </widget> 10 36 <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget"> 11 37 <property name="title">Application PIN</property> … … 13 39 <element value="app_ac_pin"/> 14 40 </property> 15 <property name="is_required"></property> 16 <property name="label">Application PIN</property> 17 <property name="label_edit">Application PIN</property> 18 <property 19 name="help"></property> 20 <property name="readonly_layout_modes"> 21 <element value="edit"/> 22 </property> 23 <property name="hidden_layout_modes"> 24 <element value="create"/> 25 </property> 41 <property name="is_required">True</property> 42 <property name="label">Pin</property> 43 <property name="label_edit">Pin</property> 44 <property name="readonly_layout_modes"> 45 <element value="edit"/> 46 </property> 47 <property name="hidden_layout_modes"/> 48 <property name="hidden_readonly_layout_modes"/> 49 <property name="display_width">10</property> 26 50 <property name="size_max">12</property> 27 51 </widget> 28 52 <widget name="app_ac_prefix" meta_type="String Widget"> 53 <property name="title">Pin Prefix</property> 54 <property name="fields"> 55 <element value="app_ac_prefix"/> 56 </property> 57 <property name="label">Prefix</property> 58 <property name="label_edit">Prefix</property> 59 <property name="readonly_layout_modes"> 60 <element value="create"/> 61 </property> 62 <property name="hidden_layout_modes"/> 63 <property name="hidden_readonly_layout_modes"/> 64 <property name="display_width">3</property> 65 </widget> 66 <widget name="entry_mode" meta_type="String Widget"> 67 <property name="title">Mode of Entry</property> 68 <property name="fields"> 69 <element value="entry_mode"/> 70 </property> 71 <property name="label">Mode of Entry</property> 72 <property name="label_edit">Mode of Entry</property> 73 <property name="readonly_layout_modes"> 74 <element value="edit"/> 75 </property> 76 <property name="hidden_layout_modes"> 77 <element value="create"/> 78 </property> 79 <property name="hidden_readonly_layout_modes"/> 80 </widget> 81 <widget name="jamb_first_cos" meta_type="String Widget"> 82 <property name="title">JAMB First Choice Course of Study</property> 83 <property name="fields"> 84 <element value="jamb_first_cos"/> 85 </property> 86 <property name="label">JAMB First Choice Course of Study</property> 87 <property name="label_edit">JAMB First Choice Course of Study</property> 88 <property name="readonly_layout_modes"> 89 <element value="edit"/> 90 </property> 91 <property name="hidden_layout_modes"> 92 <element value="create"/> 93 </property> 94 <property name="hidden_readonly_layout_modes"/> 95 </widget> 96 <widget name="jamb_firstname" meta_type="String Widget"> 97 <property name="title">JAMB First Name</property> 98 <property name="fields"> 99 <element value="jamb_firstname"/> 100 </property> 101 <property name="label">Name</property> 102 <property name="readonly_layout_modes"> 103 <element value="edit"/> 104 </property> 105 <property name="hidden_layout_modes"> 106 <element value="create"/> 107 </property> 108 <property name="hidden_readonly_layout_modes"/> 109 </widget> 110 <widget name="jamb_lastname" meta_type="String Widget"> 111 <property name="title">JAMB Lastname</property> 112 <property name="fields"> 113 <element value="jamb_lastname"/> 114 </property> 115 <property name="readonly_layout_modes"> 116 <element value="edit"/> 117 </property> 118 <property name="hidden_layout_modes"> 119 <element value="create"/> 120 </property> 121 <property name="hidden_readonly_layout_modes"/> 122 </widget> 123 <widget name="jamb_middlename" meta_type="String Widget"> 124 <property name="title">JAMB Middle Name</property> 125 <property name="fields"> 126 <element value="jamb_middlename"/> 127 </property> 128 <property name="readonly_layout_modes"> 129 <element value="edit"/> 130 </property> 131 <property name="hidden_layout_modes"> 132 <element value="create"/> 133 </property> 134 <property name="hidden_readonly_layout_modes"/> 135 </widget> 29 136 <widget name="jamb_reg_no" meta_type="StudentId Widget"> 30 137 <property name="title">JAMB Registration Number</property> … … 32 139 <element value="jamb_reg_no"/> 33 140 </property> 34 <property name="is_required">False</property>35 141 <property name="label">JAMB Registration Number</property> 36 142 <property name="label_edit">JAMB Registration Number</property> 37 143 <property name="readonly_layout_modes"> 38 144 <element value="edit"/> 39 145 </property> 40 146 <property name="hidden_layout_modes"/> … … 43 149 <property name="size_max">10</property> 44 150 </widget> 45 46 <widget name="jamb_firstname" meta_type="String Widget"> 47 <property name="title">JAMB First Name</property> 48 <property name="fields"> 49 <element value="jamb_firstname"/> 50 </property> 51 <property name="is_required">False</property> 52 <property name="label">Name</property> 53 <property name="label_edit"></property> 54 <property name="readonly_layout_modes"> 55 <element value="edit"/> 56 </property> 57 <property name="hidden_layout_modes"/> 58 <property name="hidden_readonly_layout_modes"/> 59 </widget> 60 61 <widget name="jamb_lastname" meta_type="String Widget"> 62 <property name="title">JAMB Lastname</property> 63 <property name="fields"> 64 <element value="jamb_lastname"/> 65 </property> 66 <property name="label"></property> 67 <property name="label_edit"></property> 68 <property name="readonly_layout_modes"> 69 <element value="edit"/> 70 </property> 71 <property name="hidden_layout_modes"/> 72 <property name="hidden_readonly_layout_modes"/> 73 </widget> 74 75 <widget name="jamb_middlename" meta_type="String Widget"> 76 <property name="title">JAMB Middle Name</property> 77 <property name="fields"> 78 <element value="jamb_middlename"/> 79 </property> 80 <property name="label"></property> 81 <property name="label_edit"></property> 82 <property name="readonly_layout_modes"> 83 <element value="edit"/> 84 </property> 85 <property name="hidden_layout_modes"/> 86 <property name="hidden_readonly_layout_modes"/> 87 </widget> 88 89 <widget name="entry_mode" meta_type="String Widget"> 90 <property name="title">Mode of Entry</property> 91 <property name="fields"> 92 <element value="entry_mode"/> 93 </property> 94 <property name="label">Mode of Entry</property> 95 <property name="label_edit">Mode of Entry</property> 96 <property name="readonly_layout_modes"> 97 <element value="edit"/> 98 </property> 99 <property name="hidden_layout_modes"/> 100 <property name="hidden_readonly_layout_modes"/> 101 </widget> 102 151 <widget name="jamb_second_cos" meta_type="String Widget"> 152 <property name="title">JAMB Second Choice Course of Study</property> 153 <property name="fields"> 154 <element value="jamb_second_cos"/> 155 </property> 156 <property name="label">JAMB Second Choice Course of Study</property> 157 <property name="label_edit">JAMB Second Choice Course of Study</property> 158 <property name="readonly_layout_modes"> 159 <element value="edit"/> 160 </property> 161 <property name="hidden_layout_modes"> 162 <element value="create"/> 163 </property> 164 <property name="hidden_readonly_layout_modes"/> 165 </widget> 103 166 <widget name="jamb_sex" meta_type="String Widget"> 104 167 <property name="title">JAMB Sex</property> … … 109 172 <property name="label_edit">JAMB Sex</property> 110 173 <property name="readonly_layout_modes"> 111 <element value="edit"/> 112 </property> 113 <property name="hidden_layout_modes"/> 114 <property name="hidden_readonly_layout_modes"/> 115 </widget> 116 117 118 <widget name="jamb_first_cos" meta_type="String Widget"> 119 <property name="title">JAMB First Choice Course of Study</property> 120 <property name="fields"> 121 <element value="jamb_first_cos"/> 122 </property> 123 <property name="label">JAMB First Choice Course of Study</property> 124 <property name="label_edit">JAMB First Choice Course of Study</property> 125 <property name="readonly_layout_modes"> 126 <element value="edit"/> 127 </property> 128 <property name="hidden_layout_modes"/> 129 <property name="hidden_readonly_layout_modes"/> 130 </widget> 131 132 <widget name="jamb_second_cos" meta_type="String Widget"> 133 <property name="title">JAMB Second Choice Course of Study</property> 134 <property name="fields"> 135 <element value="jamb_second_cos"/> 136 </property> 137 <property name="label">JAMB Second Choice Course of Study</property> 138 <property name="label_edit">JAMB Second Choice Course of Study</property> 139 <property name="readonly_layout_modes"> 140 <element value="edit"/> 141 </property> 142 <property name="hidden_layout_modes"/> 143 <property name="hidden_readonly_layout_modes"/> 144 </widget> 145 146 174 <element value="edit"/> 175 </property> 176 <property name="hidden_layout_modes"> 177 <element value="create"/> 178 </property> 179 <property name="hidden_readonly_layout_modes"/> 180 </widget> 147 181 <widget name="passport" meta_type="Image Widget"> 148 182 <property name="title">Passport Picture</property> … … 150 184 <element value="passport"/> 151 185 </property> 186 <property name="is_required">True</property> 152 187 <property name="label">Passport Picture</property> 153 188 <property name="label_edit">Passport Picture</property> 189 <property 190 name="help">Upload passport photograph with red background</property> 154 191 <property name="readonly_layout_modes"/> 155 <property name="hidden_layout_modes"/> 156 <property name="hidden_readonly_layout_modes"/> 157 <property name="help">Upload passport photograph with red background</property> 192 <property name="hidden_layout_modes"> 193 <element value="create"/> 194 </property> 195 <property name="hidden_readonly_layout_modes"/> 158 196 <property name="size_max">204800</property> 197 <property name="display_external_editor">False</property> 159 198 <property name="display_width">300</property> 160 199 <property name="display_height">600</property> 161 200 <property name="allow_resize">True</property> 162 201 </widget> 163 164 202 <table> 165 203 <row> 166 <cell name="app_ac_pin"/> 167 </row> 168 <row> 169 <cell name="jamb_reg_no"/> 170 </row> 171 <row> 172 <cell name="jamb_firstname"/> 173 </row> 174 <row> 175 <cell name="jamb_middlename"/> 176 </row> 177 <row> 178 <cell name="jamb_lastname"/> 179 </row> 180 <row> 181 <cell name="jamb_sex"/> 182 </row> 183 <row> 184 <cell name="jamb_first_cos"/> 185 </row> 186 <row> 187 <cell name="jamb_second_cos"/> 188 </row> 189 <row> 190 <cell name="passport"/> 204 <cell name="jamb_reg_no" ncols="3"/> 205 </row> 206 <row> 207 <cell name="app_ac_prefix" ncols="1"/> 208 <cell name="app_ac_batch_no" ncols="1"/> 209 <cell name="app_ac_pin" ncols="1"/> 210 </row> 211 <row> 212 <cell name="jamb_firstname" ncols="3"/> 213 </row> 214 <row> 215 <cell name="jamb_middlename" ncols="3"/> 216 </row> 217 <row> 218 <cell name="jamb_lastname" ncols="3"/> 219 </row> 220 <row> 221 <cell name="jamb_sex" ncols="3"/> 222 </row> 223 <row> 224 <cell name="jamb_first_cos" ncols="3"/> 225 </row> 226 <row> 227 <cell name="jamb_second_cos" ncols="3"/> 228 </row> 229 <row> 230 <cell name="passport" ncols="3"/> 191 231 </row> 192 232 </table> 193 194 195 233 </object> 196 -
WAeUP_SRP/trunk/profiles/default/schemas.xml
r478 r479 17 17 <object name="student_accommodation" meta_type="CPS Schema"/> 18 18 <object name="student_application" meta_type="CPS Schema"/> 19 <object name="student_check_pin" meta_type="CPS Schema"/>20 19 <object name="student_clearance" meta_type="CPS Schema"/> 21 20 <object name="student_personal" meta_type="CPS Schema"/> -
WAeUP_SRP/trunk/profiles/default/workflows.xml
r472 r479 14 14 <object name="waeup_section_wf" meta_type="CPS Workflow"/> 15 15 <object name="waeup_student_wf" meta_type="CPS Workflow"/> 16 <object name="waeup_student_subobject_wf" meta_type="CPS Workflow"/> 16 17 <object name="waeup_workspace_wf" meta_type="CPS Workflow"/> 17 18 <bindings> … … 50 51 <bound-workflow workflow_id="section_folder_wf"/> 51 52 </type> 52 <type type_id="Jamb">53 <bound-workflow workflow_id="waeup_base_wf"/>54 </type>55 <type type_id="Members Workspace">56 <bound-workflow workflow_id="workspace_folder_wf"/>57 </type>58 53 <type type_id="ScratchCardBatch"> 59 54 <bound-workflow workflow_id="section_folder_wf"/> 60 55 </type> 61 56 <type type_id="ScratchCardBatchesFolder"> 62 <bound-workflow workflow_id="section_folder_wf"/>63 </type>64 <type type_id="Section">65 57 <bound-workflow workflow_id="section_folder_wf"/> 66 58 </type> … … 72 64 </type> 73 65 <type type_id="StudentApplication"> 74 <bound-workflow workflow_id="waeup_student_ wf"/>66 <bound-workflow workflow_id="waeup_student_subobject_wf"/> 75 67 </type> 76 68 <type type_id="StudentClearance"> 77 <bound-workflow workflow_id="waeup_student_ wf"/>69 <bound-workflow workflow_id="waeup_student_subobject_wf"/> 78 70 </type> 79 71 <type type_id="StudentPersonal"> 80 <bound-workflow workflow_id="waeup_student_ wf"/>72 <bound-workflow workflow_id="waeup_student_subobject_wf"/> 81 73 </type> 82 74 <type type_id="StudentStudyCourse"> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
r478 r479 124 124 trigger="USER" 125 125 before_script="" 126 after_script=" ">126 after_script="open_application_personal"> 127 127 128 128 <guard> -
WAeUP_SRP/trunk/skins/waeup_student/application_form.pt
r478 r479 11 11 12 12 <metal:block fill-slot="main"> 13 14 <tal:block tal:condition="python:context.portal_type == 'Student'" tal:omit-tag=""> 15 <tal:block tal:define=" 16 rendered python:context.application.getContent().renderEdit(layout_id='student_application_fe', 17 layout_mode='edit');" 18 > 19 20 13 <tal:block 14 tal:define="rendered python:context.getContent().renderEdit( 15 layout_id='student_application_fe', 16 layout_mode='edit', 17 );"> 21 18 <tal:block tal:content="structure rendered" /> 22 23 19 </tal:block> 24 </tal:block>25 <tal:block condition="python:context.portal_type != 'Student'">26 27 This is not a student object28 29 30 </tal:block>31 32 20 </metal:block> 33 34 35 36 21 <metal:block fill-slot="sub"> 37 22 </metal:block> -
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r478 r479 5 5 return html renderer + psm 6 6 """ 7 import DateTime8 current = DateTime.DateTime()9 10 7 type_name = 'StudentApplication' 11 12 8 ti = context.portal_types[type_name] 13 14 9 REQUEST.set('type_name',type_name) 15 10 16 11 validate = REQUEST.has_key("cpsdocument_create_button") 17 12 18 19 13 lt = context.portal_layouts 20 14 pr = context.portal_registration 21 15 22 res,psm,ds = lt.renderLayout(layout_id= 'student_check_pin', 23 schema_id= 'student_check_pin', 16 prefix = 'APP' 17 res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe', 18 schema_id= 'student_application', 24 19 context=context, 25 20 mapping=validate and REQUEST, 26 ob={ },21 ob={'app_ac_prefix': prefix}, 27 22 layout_mode='create', 28 23 formaction = "apply_admission", … … 60 55 student = application.aq_parent 61 56 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 62 student.invokeFactory('StudentClearance','clearance')57 #student.invokeFactory('StudentClearance','clearance') 63 58 student.invokeFactory('StudentPersonal','personal') 64 59 student.content_status_modify(workflow_action="enter_application_pin") 60 65 61 66 62 apdoc = application.getContent() … … 80 76 student.personal.getContent().edit(mapping = dp) 81 77 da = {} 82 da['app_ac_pin'] = ds['pin'] 78 da['app_ac_prefix'] = prefix 79 da['app_ac_batch_no'] = ds.get('app_ac_batch_no') 80 da['app_ac_pin'] = ds.get('app_ac_pin') 83 81 apdoc.edit(mapping = da) 84 82 # now display the passport form with jamb-data readonly 83 return context.REQUEST.RESPONSE.redirect("%s/application_form" % (student.application.absolute_url())) 85 84 return student.application_form() 86 85 -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r478 r479 35 35 # (We don't call getEditableContent here, validate does it when needed.) 36 36 doc = context.getContent() 37 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,38 use_session=True)39 37 40 if action is None: 41 ti = doc.getTypeInfo() 42 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 43 action = '/' + action 44 45 if is_valid: 46 comments = REQUEST.get('comments') 47 context.cpsdocument_notify_modification(comments=comments) 48 if cpsdocument_edit_and_view_button is not None: 49 action = '' 50 psm = 'psm_content_changed' 51 args = {} 38 if context.portal_type == "StudentApplication": 39 student = context.aq_parent 40 if context.portal_workflow.getInfoFor(student,'review_state',None) == "application_pin_entered": 41 student.content_status_modify(workflow_action="apply_for_admission") 42 is_valid, ds = doc.validate(request=REQUEST, 43 proxy=context, 44 layout_id = "student_application_fe", 45 layout_mode = 'edit', 46 use_session=True) 47 48 action = '/application_form' 49 50 if is_valid: 51 comments = REQUEST.get('comments') 52 context.cpsdocument_notify_modification(comments=comments) 53 if cpsdocument_edit_and_view_button is not None: 54 action = '' 55 psm = 'psm_content_changed' 56 args = {} 57 else: 58 psm = 'psm_content_error' 59 args = getFormUidUrlArg(REQUEST) 60 else: 61 psm = "Application applied waiting for results" 62 action = "/view" 52 63 else: 53 psm = 'psm_content_error' 54 args = getFormUidUrlArg(REQUEST) 55 64 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster, 65 use_session=True) 66 67 if action is None: 68 ti = doc.getTypeInfo() 69 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 70 action = '/' + action 71 72 if is_valid: 73 comments = REQUEST.get('comments') 74 context.cpsdocument_notify_modification(comments=comments) 75 if cpsdocument_edit_and_view_button is not None: 76 action = '' 77 psm = 'psm_content_changed' 78 args = {} 79 else: 80 psm = 'psm_content_error' 81 args = getFormUidUrlArg(REQUEST) 82 56 83 args['portal_status_message'] = psm 57 84 url = context.absolute_url() + action + '?' + urlencode(args)
Note: See TracChangeset for help on using the changeset viewer.