- Timestamp:
- 24 May 2013, 07:37:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py
r9985 r10223 80 80 @property 81 81 def form_fields(self): 82 target = getattr(self.context.__parent__, 'prefix', None) 83 if target is not None and target.startswith('pg'): 82 if self.target is not None and self.target.startswith('pg'): 84 83 form_fields = grok.AutoFields(INigeriaPGApplicant) 85 84 for field in PG_OMIT_DISPLAY_FIELDS: 86 85 form_fields = form_fields.omit(field) 87 elif target is not None andtarget.startswith('putme'):86 elif self.target is not None and self.target.startswith('putme'): 88 87 form_fields = grok.AutoFields(INigeriaUGApplicant) 89 88 for field in PUTME_OMIT_DISPLAY_FIELDS: 90 89 form_fields = form_fields.omit(field) 91 elif target is not None andtarget.startswith('pude'):90 elif self.target is not None and self.target.startswith('pude'): 92 91 form_fields = grok.AutoFields(INigeriaUGApplicant) 93 92 for field in PUDE_OMIT_DISPLAY_FIELDS: … … 116 115 #@property 117 116 #def note(self): 118 # target = getattr(self.context.__parent__, 'prefix', None) 119 # if target is not None and not target.startswith('pg') \ 117 # if self.target is not None and not self.target.startswith('pg') \ 120 118 # and not self._reduced_slip(): 121 119 # return _(u'<br /><br /><br />' … … 125 123 @property 126 124 def form_fields(self): 127 target = getattr(self.context.__parent__, 'prefix', None) 128 if target is not None and target.startswith('pg'): 125 if self.target is not None and self.target.startswith('pg'): 129 126 form_fields = grok.AutoFields(INigeriaPGApplicant) 130 127 for field in PG_OMIT_PDF_FIELDS: 131 128 form_fields = form_fields.omit(field) 132 elif target is not None andtarget.startswith('putme'):129 elif self.target is not None and self.target.startswith('putme'): 133 130 form_fields = grok.AutoFields(INigeriaUGApplicant) 134 131 if self._reduced_slip(): … … 138 135 for field in PUTME_OMIT_PDF_FIELDS: 139 136 form_fields = form_fields.omit(field) 140 elif target is not None andtarget.startswith('pude'):137 elif self.target is not None and self.target.startswith('pude'): 141 138 form_fields = grok.AutoFields(INigeriaUGApplicant) 142 139 if self._reduced_slip(): … … 166 163 @property 167 164 def form_fields(self): 168 target = getattr(self.context.__parent__, 'prefix', None) 169 if target is not None and target.startswith('pg'): 165 if self.target is not None and self.target.startswith('pg'): 170 166 form_fields = grok.AutoFields(INigeriaPGApplicant) 171 167 for field in PG_OMIT_MANAGE_FIELDS: 172 168 form_fields = form_fields.omit(field) 173 elif target is not None andtarget.startswith('putme'):169 elif self.target is not None and self.target.startswith('putme'): 174 170 form_fields = grok.AutoFields(INigeriaUGApplicant) 175 171 for field in PUTME_OMIT_MANAGE_FIELDS: 176 172 form_fields = form_fields.omit(field) 177 elif target is not None andtarget.startswith('pude'):173 elif self.target is not None and self.target.startswith('pude'): 178 174 form_fields = grok.AutoFields(INigeriaUGApplicant) 179 175 for field in PUDE_OMIT_MANAGE_FIELDS: … … 193 189 @property 194 190 def form_fields(self): 195 target = getattr(self.context.__parent__, 'prefix', None) 196 if target is not None and target.startswith('pg'): 191 if self.target is not None and self.target.startswith('pg'): 197 192 form_fields = grok.AutoFields(INigeriaPGApplicantEdit) 198 193 for field in PG_OMIT_EDIT_FIELDS: 199 194 form_fields = form_fields.omit(field) 200 elif target is not None andtarget.startswith('putme'):195 elif self.target is not None and self.target.startswith('putme'): 201 196 form_fields = grok.AutoFields(IPUTMEApplicantEdit) 202 197 for field in PUTME_OMIT_EDIT_FIELDS: 203 198 form_fields = form_fields.omit(field) 204 elif target is not None andtarget.startswith('pude'):199 elif self.target is not None and self.target.startswith('pude'): 205 200 form_fields = grok.AutoFields(INigeriaUGApplicantEdit) 206 201 for field in PUDE_OMIT_EDIT_FIELDS:
Note: See TracChangeset for help on using the changeset viewer.