Changeset 7459 for main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Timestamp:
- 12 Jan 2012, 16:19:57 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7438 r7459 38 38 from waeup.sirp.browser.interfaces import ICaptchaManager 39 39 from waeup.sirp.browser.breadcrumbs import Breadcrumb 40 from waeup.sirp.browser.layout import NullValidator, jsaction 40 from waeup.sirp.browser.layout import ( 41 NullValidator, jsaction, action, UtilityView) 41 42 from waeup.sirp.browser.pages import add_local_role, del_local_roles 42 43 from waeup.sirp.browser.resources import datepicker, tabs, datatable, warning … … 120 121 return 121 122 122 @ grok.action('Add applicants container', validator=NullValidator)123 @action('Add applicants container', validator=NullValidator) 123 124 def addApplicantsContainer(self, **data): 124 125 self.redirect(self.url(self.context, '@@add')) 125 126 return 126 127 127 @ grok.action('Cancel', validator=NullValidator)128 @action('Cancel', validator=NullValidator) 128 129 def cancel(self, **data): 129 130 self.redirect(self.url(self.context)) 130 131 return 131 132 132 @ grok.action('Add local role', validator=NullValidator)133 @action('Add local role', validator=NullValidator) 133 134 def addLocalRole(self, **data): 134 135 return add_local_role(self,2, **data) 135 136 136 @ grok.action('Remove selected local roles')137 @action('Remove selected local roles') 137 138 def delLocalRoles(self, **data): 138 139 return del_local_roles(self,2,**data) … … 156 157 return super(ApplicantsContainerAddFormPage, self).update() 157 158 158 @ grok.action('Add applicants container')159 @action('Add applicants container') 159 160 def addApplicantsContainer(self, **data): 160 161 year = data['year'] … … 178 179 return 179 180 180 @ grok.action('Cancel', validator=NullValidator)181 @action('Cancel', validator=NullValidator) 181 182 def cancel(self, **data): 182 183 self.redirect(self.url(self.context, '@@manage') + '#tab-1') … … 280 281 return get_users_with_local_roles(self.context) 281 282 282 @ grok.action('Save')283 @action('Save') 283 284 def apply(self, **data): 284 285 self.applyData(self.context, **data) … … 310 311 return 311 312 312 @ grok.action('Add applicant', validator=NullValidator)313 @action('Add applicant', validator=NullValidator) 313 314 def addApplicant(self, **data): 314 315 self.redirect(self.url(self.context, 'addapplicant')) 315 316 return 316 317 317 @ grok.action('Cancel', validator=NullValidator)318 @action('Cancel', validator=NullValidator) 318 319 def cancel(self, **data): 319 320 self.redirect(self.url(self.context)) 320 321 return 321 322 322 @ grok.action('Add local role', validator=NullValidator)323 @action('Add local role', validator=NullValidator) 323 324 def addLocalRole(self, **data): 324 325 return add_local_role(self,3, **data) 325 326 326 @ grok.action('Remove selected local roles')327 @action('Remove selected local roles') 327 328 def delLocalRoles(self, **data): 328 329 return del_local_roles(self,3,**data) … … 345 346 return "Applicants Container: %s" % self.context.title 346 347 347 @ grok.action('Create application record')348 @action('Create application record') 348 349 def addApplicant(self, **data): 349 350 applicant = createObject(u'waeup.Applicant') … … 409 410 'applicant_id', 'firstname', 'lastname','email', 'course1') 410 411 411 class CreateStudentPage( grok.View):412 class CreateStudentPage(UtilityView, grok.View): 412 413 """Create a student object from applicatnt data 413 414 and copy applicant object. … … 426 427 return 427 428 428 class AcceptanceFeePaymentAddPage( grok.View):429 class AcceptanceFeePaymentAddPage(UtilityView, grok.View): 429 430 """ Page to add an online payment ticket 430 431 """ … … 493 494 self.context.__parent__.display_fullname,self.context.p_id) 494 495 495 class OnlinePaymentCallbackPage( grok.View):496 class OnlinePaymentCallbackPage(UtilityView, grok.View): 496 497 """ Callback view 497 498 """ … … 525 526 return 526 527 527 class ExportPDFPaymentSlipPage( grok.View):528 class ExportPDFPaymentSlipPage(UtilityView, grok.View): 528 529 """Deliver a PDF slip of the context. 529 530 """ … … 552 553 self.context.__parent__, applicantview) 553 554 554 class ExportPDFPage( grok.View):555 class ExportPDFPage(UtilityView, grok.View): 555 556 """Deliver a PDF slip of the context. 556 557 """ … … 671 672 dict(name=x, title=y) for x, y in allowed_transitions] 672 673 673 @ grok.action('Save')674 @action('Save') 674 675 def save(self, **data): 675 676 form = self.request.form … … 739 740 # We explicitely want the forms to be validated before payment tickets 740 741 # can be created. If no validation is requested, use 741 # 'validator=NullValidator' in the grok.action directive742 @ grok.action('Add online payment ticket')742 # 'validator=NullValidator' in the action directive 743 @action('Add online payment ticket') 743 744 def addPaymentTicket(self, **data): 744 745 self.redirect(self.url(self.context, '@@addafp')) … … 763 764 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 764 765 form_fields['phone'].custom_widget = PhoneWidget 766 form_fields['applicant_id'].for_display = True 765 767 grok.template('applicanteditpage') 766 768 manage_applications = False … … 808 810 # We explicitely want the forms to be validated before payment tickets 809 811 # can be created. If no validation is requested, use 810 # 'validator=NullValidator' in the grok.action directive811 @ grok.action('Add online payment ticket')812 # 'validator=NullValidator' in the action directive 813 @action('Add online payment ticket') 812 814 def addPaymentTicket(self, **data): 813 815 self.redirect(self.url(self.context, '@@addafp')) … … 820 822 return 821 823 822 @ grok.action('Save')824 @action('Save') 823 825 def save(self, **data): 824 826 if self.passport_changed is False: # False is not None! … … 828 830 return 829 831 830 @ grok.action('Final Submit')832 @action('Final Submit') 831 833 def finalsubmit(self, **data): 832 834 if self.passport_changed is False: # False is not None! … … 903 905 return 904 906 905 @ grok.action('Get login credentials')907 @action('Get login credentials') 906 908 def register(self, **data): 907 909 if not self.captcha_result.is_valid: -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt
r7384 r7459 13 13 <img src="" tal:attributes="src view/passport_url" /> 14 14 15 <table class=" zebra">15 <table class="form-table"> 16 16 <tbody> 17 17 <tal:block repeat="widget view/widgets"> … … 26 26 </tal:block> 27 27 <tr> 28 <td class="fieldname" width="33%">28 <td class="fieldname"> 29 29 Admitted Course of Study: 30 30 </td> … … 44 44 </table> 45 45 <h3 i18n:translate="">Acceptance Fee Payment Tickets</h3> 46 <table class="zebra">46 <table> 47 47 <thead> 48 48 <tr> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt
r7254 r7459 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 class="edit-form"enctype="multipart/form-data">2 enctype="multipart/form-data"> 3 3 4 4 <h2 i18n:translate="" … … 14 14 </div> 15 15 16 <div class=" form-status"16 <div class="alert-message error" 17 17 tal:define="status view/status" 18 18 tal:condition="status"> … … 23 23 </div> 24 24 25 <table class=" zebra">25 <table class="form-table"> 26 26 <tbody> 27 27 <tal:block repeat="widget view/widgets"> 28 28 <tr> 29 <td class="label"> 30 <label tal:attributes="for widget/name"> 31 <span class="required" tal:condition="widget/required">*</span> 32 <span i18n:translate="" tal:content="widget/label">label</span>: 33 </label> 29 <td class="fieldname"> 30 <span tal:condition="widget/required">*</span> 31 <span i18n:translate="" tal:content="widget/label">label</span>: 34 32 </td> 35 <td class="field">36 <span class="widget"tal:content="structure widget">33 <td> 34 <span tal:content="structure widget"> 37 35 <input type="text" /> 38 36 </span> … … 41 39 </tal:error> 42 40 <tal:hint tal:condition="widget/hint"> 43 <span class="hint"tal:content="structure widget/hint">hint</span>41 <span tal:content="structure widget/hint">hint</span> 44 42 </tal:hint> 45 43 </td> … … 47 45 </tal:block> 48 46 <tr> 49 <td class=" label">50 <label i18n:translate="" for="form.passport">Photograph</label>47 <td class="fieldname"> 48 Photograph 51 49 </td> 52 <td class="field"> 53 <span class="widget"> 54 <img src="passport.jpg" /><br /> 55 <input type="file" name="form.passport" /> 56 <br /> 57 <span i18n:translate=""> 58 Max. file size: 59 <span tal:replace="view/max_upload_size">10 KB</span> 60 </span> 50 <td> 51 <img src="passport.jpg" /><br /> 52 <input type="file" name="form.passport" /> 53 <br /> 54 <span i18n:translate=""> 55 Max. file size: 56 <span tal:replace="view/max_upload_size">10 KB</span> 61 57 </span> 62 58 </tr> 63 59 <tr tal:condition="view/manage_applications"> 64 <td class=" label"><label>Password:</label></td>60 <td class="fieldname">Password:</td> 65 61 <td> 66 62 <input name="password" type="password" /> … … 68 64 </tr> 69 65 <tr tal:condition="view/manage_applications"> 70 <td class=" label"><label>Retype password:</label></td>66 <td class="fieldname">Retype password:</td> 71 67 <td> 72 68 <input name="control_password" type="password" /> … … 74 70 </tr> 75 71 <tr tal:condition="view/manage_applications"> 76 <td class=" label"><label>Application Transition:</label></td>72 <td class="fieldname">Application Transition:</td> 77 73 <td> 78 74 <select id="transition" name="transition"> … … 88 84 89 85 <div tal:condition="not: view/manage_applications"> 90 <input class="checkboxType"id="confirm_passport" name="confirm_passport"86 <input id="confirm_passport" name="confirm_passport" 91 87 type="checkbox" value="True"/> 92 88 I confirm that the Passport Photograph uploaded on this form is a … … 94 90 </div> 95 91 96 <div class="actionButtons"tal:condition="view/availableActions">92 <div tal:condition="view/availableActions"> 97 93 <span tal:repeat="action view/actions" 98 94 tal:omit-tag=""> … … 105 101 <h3 i18n:translate="">Acceptance Fee Payment Tickets</h3> 106 102 107 <table class="display dataTableManage">103 <table> 108 104 <thead> 109 105 <tr> … … 136 132 </table> 137 133 138 <div class="actionButtons"tal:condition="view/availableActions">134 <div tal:condition="view/availableActions"> 139 135 <span tal:repeat="action view/actions" 140 136 tal:omit-tag=""> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt
r7381 r7459 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 class="edit-form"enctype="multipart/form-data">2 enctype="multipart/form-data"> 3 3 4 4 <h2 i18n:translate="" … … 6 6 tal:content="view/label">Label</h2> 7 7 8 <div class=" form-status"8 <div class="alert-message error" 9 9 tal:define="status view/status" 10 10 tal:condition="status"> … … 15 15 </div> 16 16 17 <table class=" zebra">17 <table class="form-table"> 18 18 <tbody> 19 19 <tal:block repeat="widget view/widgets"> 20 20 <tr> 21 <td class="label"> 22 <label tal:attributes="for widget/name"> 23 <span class="required" tal:condition="widget/required">*</span> 24 <span i18n:translate="" tal:content="widget/label">label</span>: 25 </label> 21 <td class="fieldname"> 22 <span tal:condition="widget/required">*</span> 23 <span i18n:translate="" tal:content="widget/label">label</span>: 26 24 </td> 27 <td class="field">28 <span class="widget"tal:content="structure widget">25 <td> 26 <span tal:content="structure widget"> 29 27 <input type="text" /> 30 28 </span> … … 33 31 </tal:error> 34 32 <tal:hint tal:condition="widget/hint"> 35 <span class="hint"tal:content="structure widget/hint">hint</span>33 <span tal:content="structure widget/hint">hint</span> 36 34 </tal:hint> 37 35 </td> … … 54 52 credentials will be sent to the address provided. 55 53 </p> 56 <div class="actionButtons"tal:condition="view/availableActions">54 <div tal:condition="view/availableActions"> 57 55 <input tal:repeat="action view/actions" 58 56 tal:replace="structure action/render" -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontaineraddpage.pt
r6756 r7459 6 6 tal:content="view/label">Label</h2> 7 7 8 <div class=" form-status"8 <div class="alert-message error" 9 9 tal:define="status view/status" 10 10 tal:condition="status"> … … 15 15 </div> 16 16 17 <table class=" zebra">17 <table class="form-table"> 18 18 <tbody> 19 19 <tal:block repeat="widget view/widgets"> 20 20 <tr> 21 <td class="label"> 22 <label tal:attributes="for widget/name"> 23 <span class="required" tal:condition="widget/required">*</span> 24 <span i18n:translate="" tal:content="widget/label">label</span>: 25 </label> 21 <td class="fieldname"> 22 <span tal:condition="widget/required">*</span> 23 <span i18n:translate="" tal:content="widget/label">label</span>: 26 24 </td> 27 <td class="field">28 <span class="widget"tal:content="structure widget">25 <td> 26 <span tal:content="structure widget"> 29 27 <input type="text" /> 30 28 </span> … … 33 31 </tal:error> 34 32 <tal:hint tal:condition="widget/hint"> 35 <span class="hint"tal:content="structure widget/hint">hint</span>33 <span tal:content="structure widget/hint">hint</span> 36 34 </tal:hint> 37 35 </td> … … 41 39 </table> 42 40 43 <div class="actionButtons"tal:condition="view/availableActions">41 <div tal:condition="view/availableActions"> 44 42 <input tal:repeat="action view/actions" 45 43 tal:replace="structure action/render" -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt
r7364 r7459 1 1 <form action="." tal:attributes="action request/URL" method="POST" class="edit-form" enctype="multipart/form-data"> 2 2 <h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2> 3 <div class=" form-status" tal:define="status view/status" tal:condition="status"> Form Status:3 <div class="alert-message error" tal:define="status view/status" tal:condition="status"> Form Status: 4 4 <span i18n:translate="" tal:content="view/status"> Form status summary 5 5 </span> 6 6 </div> 7 < div id="tabs">8 < ul>9 <li>10 < a href="#tab-1">11 <span>Settings12 </span></a>13 </li>14 <li>15 < a href="#tab-2">16 <span>Applicants17 </span></a>18 </li>19 <li>20 < a href="#tab-3">21 <span>Local Roles22 </span></a>23 </li>24 </ul>25 <div id="tab-1" >26 <table class=" zebra">7 <ul class="tabs" data-tabs="tabs"> 8 <li class="active"> 9 <a href="#tab-1"> 10 <span>Settings 11 </span></a> 12 </li> 13 <li> 14 <a href="#tab-2"> 15 <span>Applicants 16 </span></a> 17 </li> 18 <li> 19 <a href="#tab-3"> 20 <span>Local Roles 21 </span></a> 22 </li> 23 </ul> 24 <div class="tab-content"> 25 <div id="tab-1" class="active"> 26 <table class="form-table"> 27 27 <tbody> 28 28 <tal:block repeat="widget view/widgets"> 29 29 <tr> 30 <td class="label"> 31 <label tal:attributes="for widget/name"> 32 <span class="required" tal:condition="widget/required">* 33 </span> 34 <span i18n:translate="" tal:content="widget/label">label 35 </span>: 36 </label> </td> 37 <td class="field"> 38 <span class="widget" tal:content="structure widget"> 30 <td class="fieldname"> 31 <span tal:condition="widget/required">* 32 </span> 33 <span i18n:translate="" tal:content="widget/label">label 34 </span>: 35 </td> 36 <td> 37 <span tal:content="structure widget"> 39 38 <input type="text" /> 40 39 </span> … … 44 43 </tal:error> 45 44 <tal:hint tal:condition="widget/hint"> 46 <span class="hint"tal:content="structure widget/hint">hint45 <span tal:content="structure widget/hint">hint 47 46 </span> 48 47 </tal:hint> </td> … … 51 50 </tbody> 52 51 </table> 53 <div class="actionButtons"tal:condition="view/availableActions">52 <div tal:condition="view/availableActions"> 54 53 <span tal:repeat="action view/actions" tal:omit-tag=""> 55 54 <input tal:condition="python:action.label in view.taboneactions" … … 98 97 </tbody> 99 98 </table> 100 <div class="actionButtons"tal:condition="view/availableActions">99 <div tal:condition="view/availableActions"> 101 100 <span tal:repeat="action view/actions" tal:omit-tag=""> 102 101 <input tal:condition="python:action.label in view.tabtwoactions" … … 120 119 </thead> 121 120 <tbody> 122 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="grade B"> <td>121 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td> 123 122 <input type="checkbox" name="role_id" 124 123 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> … … 129 128 </tbody> 130 129 </table> 131 <div class="actionButtons"tal:condition="view/availableActions">130 <div tal:condition="view/availableActions"> 132 131 <span tal:repeat="action view/actions" tal:omit-tag=""> 133 132 <input tal:condition="python:action.label in view.tabthreeactions1" … … 135 134 </span> 136 135 </div> <br /><br /> 137 <table class=" zebra">136 <table class="form-table"> 138 137 <tr> <td> 139 138 <select id="user" name="user"> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainerpage.pt
r6509 r7459 5 5 <br /> 6 6 7 <table class=" zebra" tal:condition="layout/isAuthenticated">7 <table class="form-table" tal:condition="layout/isAuthenticated"> 8 8 <tbody> 9 9 <tal:block repeat="widget view/widgets"> … … 13 13 <tal:block replace="python:widget.label"/>: 14 14 </td> 15 <td class="field">15 <td> 16 16 <tal:block tal:replace="structure widget" /> 17 17 </td> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt
r7213 r7459 1 1 <h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2> 2 <div class="form-status" tal:define="status view/status" tal:condition="status">2 <div tal:define="status view/status" tal:condition="status" class="alert-message error"> 3 3 <div i18n:translate="" tal:content="view/status"> Form status summary 4 4 </div> … … 10 10 </ul> 11 11 </div> 12 <form action="." tal:attributes="action request/URL" method="POST" class="edit-form"enctype="multipart/form-data">13 < div id="tabs">14 < ul>15 <li>16 < a href="#tab-1">17 <span tal:content="view/subunits">Contents18 </span></a>19 </li>20 <li>21 < a href="#tab-2">22 <span>Local Roles23 </span></a>24 </li>25 </ul>26 <div id="tab-1" >12 <form action="." tal:attributes="action request/URL" method="POST" enctype="multipart/form-data"> 13 <ul class="tabs" data-tabs="tabs"> 14 <li class="active"> 15 <a href="#tab-1"> 16 <span tal:content="view/subunits">Contents 17 </span></a> 18 </li> 19 <li> 20 <a href="#tab-2"> 21 <span>Local Roles 22 </span></a> 23 </li> 24 </ul> 25 <div class="tab-content"> 26 <div id="tab-1" class="active"> 27 27 <h3 tal:content="view/subunits">Applicants Containers</h3> 28 28 <table class="display dataTableManage"> … … 40 40 </thead> 41 41 <tbody> 42 <tr tal:repeat="entry context/values" class="grade B"> <td>42 <tr tal:repeat="entry context/values" class="gradeC"> <td> 43 43 <input type="checkbox" name="val_id" tal:attributes="value entry/__name__" /> </td> 44 44 <td tal:content="entry/year">Year </td> <td> … … 48 48 </tbody> 49 49 </table> 50 <div class="actionButtons"tal:condition="view/availableActions">50 <div tal:condition="view/availableActions"> 51 51 <span tal:repeat="action view/actions" tal:omit-tag=""> 52 52 <input tal:condition="python:action.label in view.taboneactions" tal:replace="structure action/render"/> … … 69 69 </thead> 70 70 <tbody> 71 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="grade B"> <td>71 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td> 72 72 <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 73 73 <td tal:content="entry/user_name"> USERNAME </td> … … 77 77 </tbody> 78 78 </table> 79 <div class="actionButtons"tal:condition="view/availableActions">79 <div tal:condition="view/availableActions"> 80 80 <span tal:repeat="action view/actions" tal:omit-tag=""> 81 81 <input tal:condition="python:action.label in view.tabtwoactions1" tal:replace="structure action/render"/> 82 82 </span> 83 83 </div> <br /><br /> 84 <table class=" zebra">84 <table class="form-table"> 85 85 <tr> <td> 86 86 <select id="user" name="user"> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootpage.pt
r6756 r7459 10 10 </thead> 11 11 <tbody> 12 <tr tal:repeat="entry context/values" 13 class="gradeB"> 12 <tr tal:repeat="entry context/values" class="gradeC"> 14 13 <td tal:content="entry/year">Year 15 14 </td> 16 15 <td> 17 <a href=""18 tal:attributes="href python:view.url(entry)"19 tal:content="entry/__name__">Code</a>16 <a href="" 17 tal:attributes="href python:view.url(entry)" 18 tal:content="entry/__name__">Code</a> 20 19 </td> 21 20 <td tal:content="entry/title">Title
Note: See TracChangeset for help on using the changeset viewer.