- Timestamp:
- 20 Sep 2006, 06:40:54 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCatalogToolXMLAdapter.py
r502 r537 43 43 not_found = True 44 44 if not_found: 45 self._initProperties(node)46 self._initObjects(node)47 self._initIndexes(node)48 self._initColumns(node)45 #self._initProperties(node) 46 #self._initObjects(node) 47 #self._initIndexes(node) 48 #self._initColumns(node) 49 49 self._refreshCatalog() 50 50 -
WAeUP_SRP/trunk/Widgets.py
r535 r537 6 6 ##from Products.CPSSchemas.Widget import CPSWidgetType 7 7 from Products.CMFCore.utils import getToolByName 8 from Products.CPSSchemas.BasicWidgets import CPSWidget, CPSStringWidget, CPSEmailWidget 8 from Products.CPSSchemas.BasicWidgets import CPSWidget, CPSStringWidget, CPSEmailWidget,CPSImageWidget 9 9 from Products.CPSSchemas.BasicWidgets import renderHtmlTag,CPSSelectWidget, CPSStringWidget 10 10 from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget … … 380 380 ###) 381 381 382 class WAeUPImageWidget(CPSImageWidget): 383 """Photo widget.""" 384 meta_type = 'WAeUP Image Widget' 385 386 def render(self, mode, datastructure, **kw): 387 render_method = 'widget_waeup_image_render' 388 meth = getattr(self, render_method, None) 389 if meth is None: 390 raise RuntimeError("Unknown Render Method %s for widget type %s" 391 % (render_method, self.getId())) 392 img_info = self.getImageInfo(datastructure) 393 return meth(mode=mode, datastructure=datastructure, **img_info) 394 395 396 397 InitializeClass(WAeUPImageWidget) 398 399 widgetRegistry.register(WAeUPImageWidget) 400 401 382 402 ########### 383 403 -
WAeUP_SRP/trunk/__init__.py
r511 r537 13 13 import PatchCPSWorkflowWorkflowDefinition 14 14 import PatchCatalogToolXMLAdapter 15 import PatchCPSSchemasAttributeStorageAdapter 15 16 # Only for CPS 3.4.1. In 3.4.2 and later this should be fixed. 16 17 import PatchCPSDefaultImportExport -
WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml
r515 r537 2 2 <object name="student_application" meta_type="CPS Layout"> 3 3 <property name="layout_create_method"></property> 4 <property name="layout_edit_method"> </property>4 <property name="layout_edit_method">layout_application_print</property> 5 5 <property name="layout_view_method"></property> 6 6 <property name="style_prefix">layout_waeup_</property> … … 219 219 <property name="hidden_readonly_layout_modes"/> 220 220 </widget> 221 <widget name="passport" meta_type=" Image Widget">221 <widget name="passport" meta_type="WAeUPImage Widget"> 222 222 <property name="title">Passport Picture</property> 223 223 <property name="fields"> … … 324 324 </row> 325 325 <row> 326 <cell name="entry_mode" ncols="3"/> 327 </row> 328 <row> 326 329 <cell name="jamb_first_cos" ncols="3"/> 327 330 </row> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
r515 r537 160 160 <property name="hidden_readonly_layout_modes"/> 161 161 </widget> 162 <widget name="passport" meta_type=" Image Widget">162 <widget name="passport" meta_type="WAeUPImage Widget"> 163 163 <property name="title">Passport Picture</property> 164 164 <property name="fields"> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r535 r537 30 30 <exit-transition transition_id="close"/> 31 31 <permission-map name="Modify portal content" 32 acquired="True"> 32 acquired="False"> 33 <permission-role>Owner</permission-role> 33 34 <permission-role>SectionManager</permission-role> 35 <permission-role>Manager</permission-role> 34 36 </permission-map> 35 37 <permission-map name="WAeUPModify own content" … … 37 39 <permission-role>Owner</permission-role> 38 40 </permission-map> 39 <permission-map name="View" acquired="True"> 41 <permission-map name="View" acquired="False"> 42 <permission-role>Owner</permission-role> 40 43 </permission-map> 41 44 </state> -
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r535 r537 82 82 if to_waeup_student_home: 83 83 member.setProperties(last_login_time=current,login_time=current) 84 if info['review_state'] == "application_pin_entered": 85 return response.redirect("%s/passport_entry_view" % student.absolute_url()) 84 86 return response.redirect("%s" % student.absolute_url()) 85 87 -
WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt
r516 r537 1 <html metal:use-macro="here/content_lib_master/macros/master"> 2 <metal:block fill-slot="head_slot"> 3 </metal:block> 4 5 <metal:block fill-slot="css_slot"> 6 <link rel="Stylesheet" type="text/css" href="" 7 tal:attributes="href string:${base_url}document.css" /> 8 </metal:block> 9 10 <metal:block fill-slot="header"> 11 </metal:block> 12 13 <metal:block fill-slot="main"> 14 15 <tal:block tal:condition="python:context.portal_type == 'StudentApplication'" tal:omit-tag=""> 16 <h3>Post UME Acknowledegement Slip</h3> 17 <br /> 18 19 <tal:block tal:define="application_data python:context.getContent();"> 20 21 22 <table cellpadding="10em" cellspacing=""> 23 <tr> 24 <td valign="top"> 25 <img tal:condition="application_data/passport|nothing" 26 tal:attributes="src string:${context/absolute_url}/passport"/> 27 <span tal:condition="nothing" tal:replace="structure application_data/passport" /> 28 </td> 29 30 <td> 31 32 <table width="" cellpadding="2" cellspacing="0" summary="Form layout"> 33 <tr><td>Access Code: </td><td><span tal:content="application_data/app_ac_pin" /></td></tr> 34 <tr><td>Application Date: </td><td><span tal:content="python:application_data.app_ac_date.aCommonZ()" /></td></tr> 35 <tr><td>JAMB Registration Number: </td><td><span tal:content="application_data/jamb_reg_no" /></td></tr> 36 <tr><td>Student's Name: </td><td><span tal:content="application_data/jamb_firstname" /> <span tal:content="application_data/jamb_middlename" /> <span tal:content="application_data/jamb_lastname" /></td></tr> 37 <tr><td>Sex: </td><td><span tal:content="application_data/jamb_sex" /></td></tr> 38 <tr><td>Mode of Entry: </td><td><span tal:content="application_data/entry_mode" /></td></tr> 39 <tr><td>Course of Study: </td><td><span tal:content="application_data/jamb_first_cos" />, <span tal:content="application_data/jamb_second_cos" /></td></tr> 40 <tr><td>State of Origin: </td><td><span tal:content="application_data/jamb_state" /> / <span tal:content="application_data/jamb_lga" /></td></tr> 41 <tr><td>Post UME Examination Date: </td><td></td></tr> 42 </table> 43 44 </td> 45 </tr> 46 </table> 47 48 </tal:block> 49 </tal:block> 50 <tal:block condition="python:context.portal_type != 'StudentApplication'"> 51 Please do not manipulate the URL! This is not an application object. 52 </tal:block> 53 54 </metal:block> 55 56 <metal:block fill-slot="sub"> 57 </metal:block> 58 </html> 1 <metal:html tal:define="info context/getStudentInfo"> 2 <metal:body use-macro="here/main_template/macros/master"> 3 <metal:main fill-slot="main"> 4 <span tal:condition="not: info"> 5 <metal:block use-macro="here/error_not_found/macros/not_found" /> 6 </span> 7 <span tal:condition="info" 8 tal:define="review_state info/review_state"> 9 <span tal:omit-tag="" 10 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 11 layout_mode='view', 12 layout_id='student_application')" 13 /> 14 </span> 15 </metal:main> 16 </metal:body> 17 </metal:html> -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
r535 r537 13 13 cpsmcat nocall:here/translation_service; 14 14 apply request/apply_button|nothing; 15 widgets python:context.getRenderedWidgets(layout); 15 16 "> 16 17 <span tal:condition="python: 0" tal:replace="structure widgets" /> 17 18 <form action="" id="editForm" method="post" 18 19 enctype="multipart/form-data" class="workflow" … … 20 21 21 22 > 22 <table width="" cellpadding="2" cellspacing="0" summary="Form layout"23 <table class="layoutDefault" summary="Form layout" 23 24 tal:condition="layout/rows"> 24 <tr tal:repeat="row layout/rows" valign="top" > 25 <span tal:repeat="cell row" 26 tal:attributes="colspan cell/ncols"> 27 <tal:block define="widget cell/widget; 25 <span tal:repeat="row python: layout['rows']" valign="top" > 26 <span tal:repeat="cell row"> 27 <tr tal:define="widget cell/widget; 28 28 wid widget/getWidgetId; 29 29 err python:ds.getError(wid); … … 33 33 widget_css_class cell/widget_css_class|nothing; 34 34 css_class python:test(err, 'row error','row')" 35 tal:condition="python: wid != 'passport'" 35 36 > 36 37 <div tal:attributes="class widget_css_class; … … 67 68 </td> 68 69 </div> 69 </tal:block> 70 </span> 71 </tr> 72 </table> 70 </tr> 71 </span> 72 </span> 73 <tr tal:condition="widgets/passport|nothing" tal:define="cell widgets/passport|nothing;"> 74 <tal:block tal:define="widget cell/widget; 75 wid widget/getWidgetId; 76 err python:ds.getError(wid); 77 err_mapping python:ds.getErrorMapping(wid); 78 is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes); 79 tooltip_id python:wid + '_help'; 80 widget_css_class widget/widget_css_class|nothing; 81 css_class python:test(err, 'row error','row')" 82 > 83 <div tal:attributes="class widget_css_class; 84 id python:widget.getHtmlWidgetId()+'_widget';" 85 > 86 <td> 87 <div class="label" tal:condition="widget/label_edit" 88 tal:attributes="class python:test(is_required, 'label required','label')"> 89 <label tal:content="widget/label_edit" 90 tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: 91 </div> 92 <button type="button" class="tooltipControl" 93 tal:condition="widget/help" 94 tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> 95 </td> 96 <td> 97 <span class="field"> 98 <div tal:replace="structure cell/widget_rendered"/> 99 </span> 100 <div class="tooltipArea" style="visibility: hidden;" 101 tal:condition="widget/help" 102 tal:attributes="id tooltip_id; 103 onclick python:'showElement(false, \'%s\')' % tooltip_id;" 104 > 105 <tal:block tal:content="widget/help">This is the help for this field 106 </tal:block> 107 </div> 108 <tal:block condition="err"> 109 <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> 110 <br /><em style="color: red" 111 tal:content="msg">err</em> 112 </tal:block> 113 </tal:block> 114 </td> 115 </div> 116 </tal:block> 117 </tr> 118 </table> 73 119 <br /> 74 120 <input type="submit" class="standalone" name="cpsdocument_edit_button" 75 value=" button_change"121 value="Save" 76 122 id="cpsdocument_edit_button" 77 123 tal:condition="not:creation" /> -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_view.pt
r536 r537 13 13 'jamb_second_cos',)" 14 14 > 15 <span tal:condition="nothing" tal:replace="structure widgets" />16 15 <table cellpadding="2" cellspacing="2" summary="layout"> 17 16 <tr tal:repeat="field fields"> 18 17 <tal:block tal:define="cell python: widgets[field]"> 19 18 <tal:block define="widget cell/widget"> 20 <div tal:attributes="class cell/widget_css_class| nothing;19 <div tal:attributes="class cell/widget_css_class|string:label; 21 20 id python:widget.getHtmlWidgetId()+'_widget';"> 22 21 <td > … … 40 39 <td valign="top"> 41 40 <tal:block condition="widget/label"> 42 <span class=" dlabel"41 <span class="label" 43 42 tal:content="widget/label">label</span>: 44 43 </tal:block> 45 44 </td> 46 45 <td> 47 <img src="img" tal: attributes="src string:${context/aq_parent/absolute_url}/passport" />46 <img src="img" tal:replace="structure cell/widget_rendered"> 48 47 </td> 49 48 </div> -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r535 r537 96 96 args = {} 97 97 else: 98 info['app'].content_status_modify(workflow_action="close") 98 99 psm = 'psm_content_error' 99 100 args = getFormUidUrlArg(REQUEST)
Note: See TracChangeset for help on using the changeset viewer.