- Timestamp:
- 4 Sep 2006, 13:03:08 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml
r472 r478 22 22 </property> 23 23 <property name="hidden_layout_modes"> 24 <element value="create"/> 24 <element value="create"/> 25 <element value="edit"/> 25 26 </property> 26 27 <property name="size_max">12</property> … … 35 36 <property name="label">JAMB Registration Number</property> 36 37 <property name="label_edit">JAMB Registration Number</property> 37 <property name="readonly_layout_modes"/> 38 <property name="readonly_layout_modes"> 39 <element value="edit"/> 40 </property> 38 41 <property name="hidden_layout_modes"/> 39 42 <property name="hidden_readonly_layout_modes"/> … … 50 53 <property name="label">JAMB First Name</property> 51 54 <property name="label_edit">JAMB First Name</property> 52 <property name="readonly_layout_modes"/> 53 <property name="hidden_layout_modes"/> 55 <property name="readonly_layout_modes"> 56 <element value="edit"/> 57 </property> 54 58 <property name="hidden_readonly_layout_modes"/> 55 59 </widget> … … 74 78 <property name="label">JAMB Middl Name</property> 75 79 <property name="label_edit">JAMB Middle Name</property> 76 <property name="readonly_layout_modes"/> 80 <property name="readonly_layout_modes"> 81 <element value="edit"/> 82 </property> 77 83 <property name="hidden_layout_modes"/> 78 84 <property name="hidden_readonly_layout_modes"/> … … 86 92 <property name="label">Mode of Entry</property> 87 93 <property name="label_edit">Mode of Entry</property> 88 <property name="readonly_layout_modes"/> 89 <property name="hidden_layout_modes"/> 94 <property name="readonly_layout_modes"> 95 <element value="edit"/> 96 </property> 97 <property name="hidden_layout_modes"> 98 <element value="create"/> 99 <element value="edit"/> 100 </property> 90 101 <property name="hidden_readonly_layout_modes"/> 91 102 </widget> … … 98 109 <property name="label">JAMB Sex</property> 99 110 <property name="label_edit">JAMB Sex</property> 100 <property name="readonly_layout_modes"/> 111 <property name="readonly_layout_modes"> 112 <element value="edit"/> 113 </property> 101 114 <property name="hidden_layout_modes"/> 102 115 <property name="hidden_readonly_layout_modes"/> … … 110 123 <property name="label">JAMB Age</property> 111 124 <property name="label_edit">JAMB Age</property> 112 <property name="readonly_layout_modes"/> 125 <property name="readonly_layout_modes"> 126 <element value="edit"/> 127 </property> 113 128 <property name="hidden_layout_modes"/> 114 129 <property name="hidden_readonly_layout_modes"/> … … 122 137 <property name="label">JAMB State</property> 123 138 <property name="label_edit">JAMB State</property> 124 <property name="readonly_layout_modes"/> 139 <property name="readonly_layout_modes"> 140 <element value="edit"/> 141 </property> 125 142 <property name="hidden_layout_modes"/> 126 143 <property name="hidden_readonly_layout_modes"/> … … 134 151 <property name="label">JAMB Local Government Area</property> 135 152 <property name="label_edit">JAMB Local Government Area</property> 136 <property name="readonly_layout_modes"/> 153 <property name="readonly_layout_modes"> 154 <element value="edit"/> 155 </property> 137 156 <property name="hidden_layout_modes"/> 138 157 <property name="hidden_readonly_layout_modes"/> … … 146 165 <property name="label">JAMB Score</property> 147 166 <property name="label_edit">JAMB Score</property> 148 <property name="readonly_layout_modes"/> 167 <property name="readonly_layout_modes"> 168 <element value="edit"/> 169 </property> 149 170 <property name="hidden_layout_modes"/> 150 171 <property name="hidden_readonly_layout_modes"/> … … 158 179 <property name="label">JAMB First Choice Course of Study</property> 159 180 <property name="label_edit">JAMB First Choice Course of Study</property> 160 <property name="readonly_layout_modes"/> 181 <property name="readonly_layout_modes"> 182 <element value="edit"/> 183 </property> 161 184 <property name="hidden_layout_modes"/> 162 185 <property name="hidden_readonly_layout_modes"/> … … 170 193 <property name="label">JAMB Second Choice Course of Study</property> 171 194 <property name="label_edit">JAMB Second Choice Course of Study</property> 172 <property name="readonly_layout_modes"/> 195 <property name="readonly_layout_modes"> 196 <element value="edit"/> 197 </property> 173 198 <property name="hidden_layout_modes"/> 174 199 <property name="hidden_readonly_layout_modes"/> … … 182 207 <property name="label">JAMB First Choice University</property> 183 208 <property name="label_edit">JAMB First Choice University</property> 184 <property name="readonly_layout_modes"/> 209 <property name="readonly_layout_modes"> 210 <element value="edit"/> 211 </property> 185 212 <property name="hidden_layout_modes"/> 186 213 <property name="hidden_readonly_layout_modes"/> … … 194 221 <property name="label">JAMB Second Choice University</property> 195 222 <property name="label_edit">JAMB Second Choice University</property> 196 <property name="readonly_layout_modes"/> 223 <property name="readonly_layout_modes"> 224 <element value="edit"/> 225 </property> 197 226 <property name="hidden_layout_modes"/> 198 227 <property name="hidden_readonly_layout_modes"/> … … 206 235 <property name="label">PUME General Paper</property> 207 236 <property name="label_edit">PUME General Paper</property> 208 <property name="readonly_layout_modes"/> 237 <property name="readonly_layout_modes"> 238 <element value="edit"/> 239 </property> 209 240 <property name="hidden_layout_modes"/> 210 241 <property name="hidden_readonly_layout_modes"/> … … 218 249 <property name="label">PUME English Score</property> 219 250 <property name="label_edit">PUME English Score</property> 220 <property name="readonly_layout_modes"/> 251 <property name="readonly_layout_modes"> 252 <element value="edit"/> 253 </property> 221 254 <property name="hidden_layout_modes"/> 222 255 <property name="hidden_readonly_layout_modes"/> … … 230 263 <property name="label">PUME Mathematics Score</property> 231 264 <property name="label_edit">PUME Mathematics Score</property> 232 <property name="readonly_layout_modes"/> 265 <property name="readonly_layout_modes"> 266 <element value="edit"/> 267 </property> 233 268 <property name="hidden_layout_modes"/> 234 269 <property name="hidden_readonly_layout_modes"/> … … 242 277 <property name="label">PUME Total Score</property> 243 278 <property name="label_edit">PUME Total Score</property> 244 <property name="readonly_layout_modes"/> 279 <property name="readonly_layout_modes"> 280 <element value="edit"/> 281 </property> 245 282 <property name="hidden_layout_modes"/> 246 283 <property name="hidden_readonly_layout_modes"/> … … 254 291 <property name="label">Passport Picture</property> 255 292 <property name="label_edit">Passport Picture</property> 256 <property name="readonly_layout_modes"/> 293 <property name="readonly_layout_modes"> 294 <element value="edit"/> 295 </property> 257 296 <property name="hidden_layout_modes"/> 258 297 <property name="hidden_readonly_layout_modes"/> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
r477 r478 4 4 <property name="layout_edit_method"></property> 5 5 <property name="layout_view_method"></property> 6 <property name="style_prefix">layout_ waeup_</property>6 <property name="style_prefix">layout_student_</property> 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_check_pin.xml
r477 r478 1 1 <?xml version="1.0"?> 2 2 <object name="student_check_pin" meta_type="CPS Layout"> 3 <property name="layout_create_method"> layout_check_pin_create</property>3 <property name="layout_create_method"></property> 4 4 <property name="layout_edit_method"></property> 5 5 <property name="layout_view_method"></property> 6 <property name="style_prefix">layout_ default_</property>6 <property name="style_prefix">layout_waeup_</property> 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 <widget name=" jamb_id" meta_type="JambRegNoWidget">10 <property name="title"> Jamb Registration No</property>9 <widget name="batch_no" meta_type="String Widget"> 10 <property name="title">Batch Nr</property> 11 11 <property name="fields"> 12 <element value="jamb_reg_no"/> 12 <element value="batch_no"/> 13 </property> 14 <property name="readonly_layout_modes"> 15 <element value="create"/> 16 </property> 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="jamb_reg_no" meta_type="JambRegNo Widget"> 23 <property name="title">Student Jamb RegNo</property> 24 <property name="fields"> 25 <element value="reg_no"/> 13 26 </property> 14 27 <property name="is_required">True</property> … … 21 34 <property name="title">Scratchcard Pin</property> 22 35 <property name="fields"> 23 <element value=" app_ac_pin"/>36 <element value="pin"/> 24 37 </property> 38 <property name="is_required">True</property> 25 39 <property name="label_edit">Enter Scratch Card Pin</property> 26 40 <property name="readonly_layout_modes"/> … … 28 42 <property name="hidden_readonly_layout_modes"/> 29 43 </widget> 44 <widget name="prefix" meta_type="String Widget"> 45 <property name="title">Prefix</property> 46 <property name="fields"> 47 <element value="prefix"/> 48 </property> 49 <property name="label">Prefix</property> 50 <property name="readonly_layout_modes"> 51 <element value="create"/> 52 </property> 53 <property name="hidden_layout_modes"/> 54 <property name="hidden_readonly_layout_modes"/> 55 <property name="display_width">3</property> 56 <property name="size_max">3</property> 57 </widget> 30 58 <table> 31 59 <row> 32 <cell name="jamb_ id"/>60 <cell name="jamb_reg_no" ncols="3"/> 33 61 </row> 34 62 <row> 63 <cell name="prefix"/> 64 <cell name="batch_no"/> 35 65 <cell name="pin"/> 36 66 </row> -
WAeUP_SRP/trunk/profiles/default/schemas.xml
r472 r478 14 14 <object name="student" meta_type="CPS Schema"/> 15 15 <object name="student_study_course" meta_type="CPS Schema"/> 16 <object name="scratch_card_batch .xml" meta_type="CPS Schema"/>16 <object name="scratch_card_batch" meta_type="CPS Schema"/> 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"/> 19 20 <object name="student_clearance" meta_type="CPS Schema"/> 20 21 <object name="student_personal" meta_type="CPS Schema"/> -
WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
r472 r478 36 36 <permission value="View"/> 37 37 </action> 38 <action title="Add JAMB Data" action_id="add_jamb" category="object" 39 condition_expr="" url_expr="string:${object/absolute_url}/create_jamb" 40 visible="False"/> 38 <action title="Apply for PUME " action_id="apply_admission" category="object" 39 condition_expr="" url_expr="string:${object/absolute_url}/apply_admission" 40 visible="True"> 41 <permission value="View"/> 42 </action> 41 43 <action title="Check Application Status" action_id="check_application" 42 44 category="object" 43 condition_expr=" object/portal_membership/isAnonymousUser"45 condition_expr="" 44 46 url_expr="string:${object/absolute_url}/check_application" visible="False"> 45 47 <permission value="View"/> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
r473 r478 63 63 <transition transition_id="admit" title="" 64 64 new_state="admitted" trigger="USER" 65 before_script="" after_script=" open_clearance">65 before_script="" after_script=""> 66 66 67 67 <guard> … … 74 74 new_state="admission_applied" trigger="USER" 75 75 before_script="" 76 after_script=" close_application">76 after_script=""> 77 77 78 78 <guard> … … 85 85 new_state="cleared_and_validated" 86 86 trigger="USER" before_script="" 87 after_script=" open_personal">87 after_script=""> 88 88 89 89 <guard> … … 123 123 new_state="application_pin_entered" 124 124 trigger="USER" 125 before_script=" validate_application_pin"126 after_script=" open_application">125 before_script="" 126 after_script=""> 127 127 128 128 <guard> … … 135 135 new_state="clearance_pin_entered" 136 136 trigger="USER" 137 before_script=" validate_clearance_pin"138 after_script=" open_clearance">137 before_script="" 138 after_script=""> 139 139 140 140 <guard> … … 195 195 <transition transition_id="reject_clearance" title="" 196 196 new_state="clearance_pin_entered" 197 trigger="USER" before_script=" open_clearance"197 trigger="USER" before_script="" 198 198 after_script=""> 199 199 … … 206 206 <transition transition_id="request_clearence" title="" 207 207 new_state="clearence_requested" trigger="USER" 208 before_script="" after_script="close_clearance"> 209 210 <guard> 211 <guard-role>Manager</guard-role> 212 <guard-role>SectionManager</guard-role> 213 <guard-role>Owner</guard-role> 214 </guard> 215 </transition> 216 <script script_id="close_application" 217 type="Script (Python)" 218 filename="workflows/waeup_student_wf/scripts/close_application.py"/> 219 <script script_id="close_clearance" type="Script (Python)" 220 filename="workflows/waeup_student_wf/scripts/close_clearance.py"/> 221 <script script_id="close_personal" type="Script (Python)" 222 filename="workflows/waeup_student_wf/scripts/close_personal.py"/> 223 <script script_id="open_application" type="Script (Python)" 224 filename="workflows/waeup_student_wf/scripts/open_application.py"/> 225 <script script_id="open_clearance" type="Script (Python)" 226 filename="workflows/waeup_student_wf/scripts/open_clearance.py"/> 227 <script script_id="open_personal" type="Script (Python)" 228 filename="workflows/waeup_student_wf/scripts/open_personal.py"/> 229 <script script_id="validate_application_pin" 230 type="Script (Python)" 231 filename="workflows/waeup_student_wf/scripts/validate_application_pin.py"/> 232 <script script_id="validate_clearance_pin" 233 type="Script (Python)" 234 filename="workflows/waeup_student_wf/scripts/validate_clearance_pin.py"/> 208 before_script="" after_script=""> 209 210 <guard> 211 <guard-role>Manager</guard-role> 212 <guard-role>SectionManager</guard-role> 213 <guard-role>Owner</guard-role> 214 </guard> 215 </transition> 235 216 </cps-workflow> -
WAeUP_SRP/trunk/skins/waeup_default/layout_waeup_create.pt
r477 r478 1 <tal:block define="global creation python:1" /> 2 <metal:block use-macro="here/layout_waeup_lib/macros/default_edit" /> 1 <tal:block define="global creation python:1; 2 global formaction string:apply_admission" /> 3 <metal:block use-macro="here/layout_waeup_edit/macros/default_edit" /> -
WAeUP_SRP/trunk/skins/waeup_default/layout_waeup_edit.pt
r477 r478 1 <metal:block use-macro="here/layout_waeup_lib/macros/default_edit" /> 1 <!-- a layout_lib macro --> 2 <!-- $Id: layout_lib_default_edit.pt 34052 2006-03-06 14:59:24Z atchertchian $ --> 3 <metal:block define-macro="default_edit" 4 tal:define="layout options/layout; 5 ds options/datastructure; 6 dm ds/getDataModel; 7 creation creation|nothing; 8 metadata metadata|nothing; 9 type_name request/type_name|nothing; 10 ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None); 11 creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ; 12 edit_form python:ti and ti.getActionById('edit', 'cpsdocument_edit_form') or 'cpsdocument_edit_form'; 13 metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata'; 14 formaction formaction|python: test(creation, creation_form, 15 test(metadata, metadata_form, 16 edit_form)); 17 first_layout options/first_layout|python:0; 18 last_layout options/last_layout|python:0; 19 is_flexible options/is_flexible; 20 cpsmcat nocall:here/translation_service; 21 "> 22 <tal:block condition="python:1 or first_layout"> 23 <tal:block 24 content="structure string:<form id='editForm' action='${formaction}' method='post' 25 enctype='multipart/form-data' class='workflow'> 26 <div class='group'><div class='documentFields'>" /> 27 <input type="hidden" name="type_name" value="." 28 tal:condition="creation" tal:attributes="value request/type_name" /> 29 </tal:block> 30 31 <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout" 32 tal:condition="layout/rows"> 33 <tr tal:repeat="row layout/rows" valign="top"> 34 <td tal:repeat="cell row" 35 tal:attributes="colspan cell/ncols"> 36 <tal:block define="widget cell/widget; 37 wid widget/getWidgetId; 38 err python:ds.getError(wid); 39 err_mapping python:ds.getErrorMapping(wid); 40 is_required widget/is_required|nothing; 41 tooltip_id python:wid + '_help'; 42 widget_css_class cell/widget_css_class|nothing; 43 widget_css_class python:test(is_flexible, 'group', widget_css_class); 44 css_class python:test(err, 'row error', 45 test(is_flexible, 'group', 'row'))"> 46 <div tal:attributes="class widget_css_class; 47 id python:widget.getHtmlWidgetId()+'_widget'; 48 "> 49 <div class="label" tal:condition="widget/label_edit" 50 tal:attributes="class python:test(is_required, 'label required', 51 'label')"> 52 <label i18n:translate="" tal:condition="widget/is_i18n" 53 tal:content="widget/label_edit" 54 tal:attributes="for cell/widget_input_area_id|nothing;">label</label> 55 <label tal:condition="not:widget/is_i18n" 56 tal:content="widget/label_edit" 57 tal:attributes="for cell/widget_input_area_id|nothing;">label</label> 58 </div> 59 <button type="button" class="tooltipControl" 60 tal:condition="widget/help" 61 tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> 62 <div class="field"> 63 <div tal:replace="structure cell/widget_rendered"/> 64 </div> 65 <div class="tooltipArea" style="visibility: hidden;" 66 tal:condition="widget/help" 67 tal:attributes="id tooltip_id; 68 onclick python:'showElement(false, \'%s\')' % tooltip_id;"> 69 <tal:block i18n:translate="" tal:condition="widget/is_i18n" 70 tal:content="widget/help">i18_key-help_for_this_field</tal:block> 71 <tal:block tal:condition="not:widget/is_i18n" 72 tal:content="widget/help">This is the help for this field</tal:block> 73 </div> 74 <tal:block condition="err"> 75 <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> 76 <br /><em style="color: red" 77 tal:content="msg">err</em> 78 </tal:block> 79 </tal:block> 80 <div style="float: right;" tal:condition="is_flexible"> 81 <input type="button" value="button_move_up" 82 tal:condition="not:repeat/row/start" 83 tal:attributes="name string:uprow_${repeat/row/index}; 84 onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'" 85 class="context moveUp" i18n:attributes="value" /> 86 <input type="button" value="button_move_down" 87 tal:condition="not:repeat/row/end" 88 tal:attributes="name string:downrow_${repeat/row/index}; 89 onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'" 90 class="context moveDown" i18n:attributes="value" /> 91 <input type="button" value="button_delete" 92 class="destructive" i18n:attributes="value" 93 tal:attributes="name string:deleterow_${repeat/row/index}; 94 onclick python:'CPSFlexibleEdit.buttonClick(this, \'%s\')' % 95 (cpsmcat('description_confirm_delete'), )" /> 96 </div> 97 </div> 98 </tal:block> 99 </td> 100 </tr> 101 </table> 102 103 <tal:block condition="is_flexible"> 104 <div tal:define="flexible_widgets options/flexible_widgets"> 105 <input type="hidden" name="layout_id" value="." 106 tal:attributes="value layout/layout_id" /> 107 <tal:select condition="python:len(flexible_widgets)>1"> 108 <select name="widget_type"> 109 <tal:block repeat="widget options/flexible_widgets"> 110 <option value="." 111 tal:condition="widget/is_i18n" 112 i18n:translate="" 113 tal:attributes="value widget/getWidgetId" 114 tal:content="widget/title_or_id">Type</option> 115 <option value="." 116 tal:condition="not:widget/is_i18n" 117 tal:attributes="value widget/getWidgetId" 118 tal:content="widget/title_or_id">Type</option> 119 </tal:block> 120 </select> 121 <input type="button" id="addwidget_button" 122 name="addwidget_button" value="button_add" 123 class="context" 124 i18n:attributes="value" 125 tal:attributes="onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'" /> 126 </tal:select> 127 <tal:button condition="python:len(flexible_widgets) == 1"> 128 <tal:block define="widget python:flexible_widgets[0]"> 129 <input type="hidden" name="widget_type" 130 tal:attributes="value widget/getWidgetId"> 131 <input type="submit" name="addwidget_button" 132 id="addwidget_button" 133 tal:define="button_add python:cpsmcat('button_add'); 134 widget_title python:cpsmcat(widget.title_or_id())" 135 tal:attributes="value string:${button_add} ${widget_title}" 136 class="context" /> 137 </tal:block> 138 </tal:button> 139 </div> 140 </tal:block> 141 142 <tal:block condition="python: 1 or last_layout"> 143 <tal:block content="structure string:</div>" /> 144 <metal:block define-slot="additional_content" /> 145 146 <tal:block condition="not:creation"> 147 <div class="tooltipArea" style="visibility: hidden;" 148 id="transition_comments_help" 149 onclick="showElement(false, 'transition_comments_help')" 150 i18n:translate="help_transition_comments_modification"> 151 In this filed you can give the reason of the modification that you are doing on this document. 152 Your comments may be used to notify other users. 153 </div> 154 <dl> 155 <dt><label for="comments" 156 i18n:translate="transition_comments_modification">Reason of the modification</label> 157 <button type="button" class="tooltipControl" 158 onclick="toggleElementVisibility('transition_comments_help')"> ? </button> 159 </dt> 160 <dd> 161 <textarea name="comments" id="comments" cols="60" rows="3" 162 tal:content="nothing"> 163 </textarea> 164 </dd> 165 </dl> 166 </tal:block> 167 <input type="submit" class="standalone" name="cpsdocument_edit_button" 168 value="button_change" i18n:attributes="value" id="cpsdocument_edit_button" 169 tal:condition="not:creation" /> 170 <input type="submit" class="standalone" name="cpsdocument_edit_and_view_button" 171 value="button_change_and_view" i18n:attributes="value" 172 id="cpsdocument_edit_and_view_button" 173 tal:condition="not:creation" /> 174 <input type="submit" class="standalone" name="cpsdocument_create_button" 175 value="button_create" i18n:attributes="value" tal:condition="creation" /> 176 <tal:block content="structure string:</div></form>" /> 177 </tal:block> 178 179 </metal:block> -
WAeUP_SRP/trunk/skins/waeup_student/application_form.pt
r477 r478 10 10 </metal:block> 11 11 12 <metal:block fill-slot="main" 13 tal:define="roles member/getRoles; 14 frontend python:'Student' in roles or isAnon; 15 folder here/getContent;" 16 > 12 <metal:block fill-slot="main"> 17 13 18 14 <tal:block tal:condition="python:context.portal_type == 'Student'" tal:omit-tag=""> 19 15 <tal:block tal:define=" 20 appl python:here.application;21 appl_proxy python:appl.getContent();"16 rendered python:context.application.getContent().renderEdit(layout_id='student_application_fe', 17 layout_mode='edit');" 22 18 > 23 19 24 <h2>Application Form for <span tal:content="appl_proxy/jamb_firstname" /> <span tal:content="appl_proxy/jamb_lastname" /></h2>25 20 26 <tal:block tal:content="structure python:appl_proxy.renderEdit(request=request, layout_id='student_application_fe', proxy=appl_proxy, layout_mode='edit')" /> 27 28 <tal:block tal:content="structure python:appl_proxy.renderEdit(layout_id='student_application_fe', layout_mode='view')" /> 29 30 <tal:block tal:content="structure python:appl_proxy.render(layout_id='student_application_fe')" /> 21 <tal:block tal:content="structure rendered" /> 31 22 32 23 </tal:block> … … 34 25 <tal:block condition="python:context.portal_type != 'Student'"> 35 26 36 This is not a student object! 27 This is not a student object 28 37 29 38 30 </tal:block> -
WAeUP_SRP/trunk/skins/waeup_student/application_pin_form.pt
r476 r478 18 18 <p>Instructions :</p> 19 19 <ul> 20 <li>Buy an Appli cation Scratch Card.</li>20 <li>Buy an Appliiication Scratch Card.</li> 21 21 <li>Enter your JAMB registration number and the Application PIN above.</li> 22 22 <li>Upload your passport picture.</li> -
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r477 r478 14 14 REQUEST.set('type_name',type_name) 15 15 16 validate = REQUEST.has_key("cpsdocument_ edit_button")16 validate = REQUEST.has_key("cpsdocument_create_button") 17 17 18 18 … … 21 21 22 22 res,psm,ds = lt.renderLayout(layout_id= 'student_check_pin', 23 schema_id= 'student_ application',23 schema_id= 'student_check_pin', 24 24 context=context, 25 25 mapping=validate and REQUEST, … … 31 31 if psm == 'invalid': 32 32 return context.application_pin_form(rendered = res, 33 psm = "Please correct your input", 33 #psm = "Please correct your input", 34 psm = "psm : #%s#" % (psm,), 35 firstlayout = True, 36 lastlayout = True, 34 37 ds = ds, 35 38 ) … … 37 40 return context.application_pin_form(rendered = res, 38 41 psm = None, 42 firstlayout = True, 43 lastlayout = True, 39 44 ds = ds, 40 45 ) 41 46 elif psm == 'valid': 42 jamb_id = ds.get('jamb_ id')47 jamb_id = ds.get('jamb_reg_no') 43 48 catalog = context.portal_catalog 44 49 search = catalog({'meta_type': 'StudentApplication', … … 54 59 application = search[0].getObject() 55 60 student = application.aq_parent 56 student.invokeFactory('StudentClearance','clearance') 57 student.invokeFactory('StudentPersonal','personal') 61 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 62 student.invokeFactory('StudentClearance','clearance') 63 student.invokeFactory('StudentPersonal','personal') 64 student.content_status_modify(workflow_action="enter_application_pin") 65 66 apdoc = application.getContent() 67 names = apdoc.jamb_lastname.split() 68 dp = {} 69 if len(names) == 3: 70 dp['firstname'] = names[0].capitalize() 71 dp['middlename'] = names[1].capitalize() 72 dp['lastname'] = names[2].capitalize() 73 elif len(names) == 2: 74 dp['firstname'] = names[0].capitalize() 75 dp['lastname'] = names[1].capitalize() 76 else: 77 dp['lastname'] = apdoc.jamb_lastname 78 dp['sex'] = apdoc.jamb_sex == 'M' 79 dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga ) 80 student.personal.getContent().edit(mapping = dp) 81 da = {} 82 da['app_ac_pin'] = ds['pin'] 83 apdoc.edit(mapping = da) 58 84 # now display the passport form with jamb-data readonly 59 85 return student.application_form()
Note: See TracChangeset for help on using the changeset viewer.