- Timestamp:
- 11 Jan 2012, 09:49:58 (13 years ago)
- Location:
- main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/applicants
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser.py
r7438 r7449 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 NullValidator, jsaction, action 41 41 from waeup.sirp.browser.pages import add_local_role, del_local_roles 42 42 from waeup.sirp.browser.resources import datepicker, tabs, datatable, warning … … 120 120 return 121 121 122 @ grok.action('Add applicants container', validator=NullValidator)122 @action('Add applicants container', validator=NullValidator) 123 123 def addApplicantsContainer(self, **data): 124 124 self.redirect(self.url(self.context, '@@add')) 125 125 return 126 126 127 @ grok.action('Cancel', validator=NullValidator)127 @action('Cancel', validator=NullValidator) 128 128 def cancel(self, **data): 129 129 self.redirect(self.url(self.context)) 130 130 return 131 131 132 @ grok.action('Add local role', validator=NullValidator)132 @action('Add local role', validator=NullValidator) 133 133 def addLocalRole(self, **data): 134 134 return add_local_role(self,2, **data) 135 135 136 @ grok.action('Remove selected local roles')136 @action('Remove selected local roles') 137 137 def delLocalRoles(self, **data): 138 138 return del_local_roles(self,2,**data) … … 156 156 return super(ApplicantsContainerAddFormPage, self).update() 157 157 158 @ grok.action('Add applicants container')158 @action('Add applicants container') 159 159 def addApplicantsContainer(self, **data): 160 160 year = data['year'] … … 178 178 return 179 179 180 @ grok.action('Cancel', validator=NullValidator)180 @action('Cancel', validator=NullValidator) 181 181 def cancel(self, **data): 182 182 self.redirect(self.url(self.context, '@@manage') + '#tab-1') … … 280 280 return get_users_with_local_roles(self.context) 281 281 282 @ grok.action('Save')282 @action('Save') 283 283 def apply(self, **data): 284 284 self.applyData(self.context, **data) … … 310 310 return 311 311 312 @ grok.action('Add applicant', validator=NullValidator)312 @action('Add applicant', validator=NullValidator) 313 313 def addApplicant(self, **data): 314 314 self.redirect(self.url(self.context, 'addapplicant')) 315 315 return 316 316 317 @ grok.action('Cancel', validator=NullValidator)317 @action('Cancel', validator=NullValidator) 318 318 def cancel(self, **data): 319 319 self.redirect(self.url(self.context)) 320 320 return 321 321 322 @ grok.action('Add local role', validator=NullValidator)322 @action('Add local role', validator=NullValidator) 323 323 def addLocalRole(self, **data): 324 324 return add_local_role(self,3, **data) 325 325 326 @ grok.action('Remove selected local roles')326 @action('Remove selected local roles') 327 327 def delLocalRoles(self, **data): 328 328 return del_local_roles(self,3,**data) … … 345 345 return "Applicants Container: %s" % self.context.title 346 346 347 @ grok.action('Create application record')347 @action('Create application record') 348 348 def addApplicant(self, **data): 349 349 applicant = createObject(u'waeup.Applicant') … … 671 671 dict(name=x, title=y) for x, y in allowed_transitions] 672 672 673 @ grok.action('Save')673 @action('Save') 674 674 def save(self, **data): 675 675 form = self.request.form … … 739 739 # We explicitely want the forms to be validated before payment tickets 740 740 # can be created. If no validation is requested, use 741 # 'validator=NullValidator' in the grok.action directive742 @ grok.action('Add online payment ticket')741 # 'validator=NullValidator' in the action directive 742 @action('Add online payment ticket') 743 743 def addPaymentTicket(self, **data): 744 744 self.redirect(self.url(self.context, '@@addafp')) … … 808 808 # We explicitely want the forms to be validated before payment tickets 809 809 # can be created. If no validation is requested, use 810 # 'validator=NullValidator' in the grok.action directive811 @ grok.action('Add online payment ticket')810 # 'validator=NullValidator' in the action directive 811 @action('Add online payment ticket') 812 812 def addPaymentTicket(self, **data): 813 813 self.redirect(self.url(self.context, '@@addafp')) … … 820 820 return 821 821 822 @ grok.action('Save')822 @action('Save') 823 823 def save(self, **data): 824 824 if self.passport_changed is False: # False is not None! … … 828 828 return 829 829 830 @ grok.action('Final Submit')830 @action('Final Submit') 831 831 def finalsubmit(self, **data): 832 832 if self.passport_changed is False: # False is not None! … … 903 903 return 904 904 905 @ grok.action('Get login credentials')905 @action('Get login credentials') 906 906 def register(self, **data): 907 907 if not self.captcha_result.is_valid: -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt
r7448 r7449 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"> … … 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt
r7447 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantregister.pt
r7381 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantscontaineraddpage.pt
r6756 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt
r7364 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantscontainerpage.pt
r6509 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt
r7213 r7449 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/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicantsrootpage.pt
r6756 r7449 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.