- Timestamp:
- 27 Jul 2022, 14:54:11 (2 years ago)
- Location:
- main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/browser.py
r17039 r17041 21 21 from zope.component import getUtility 22 22 from zope.i18n import translate 23 from waeup.kofa.interfaces import IExtFileStore, IKofaUtils 23 24 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 24 25 from zope.formlib.textwidgets import BytesDisplayWidget … … 29 30 OnlinePaymentDisplayFormPage, 30 31 OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage, 32 AdditionalFile 31 33 ) 32 34 from waeup.kofa.applicants.viewlets import ( … … 181 183 """ 182 184 185 def display_fileupload(self, filename): 186 if filename[1] == 'res_stat' \ 187 and self.target is not None \ 188 and not self.target.startswith('tsc'): 189 return False 190 if filename[1] == 'eligibility' \ 191 and self.target is not None \ 192 and not self.target.startswith('tsc'): 193 return False 194 return True 195 183 196 @property 184 197 def form_fields(self): … … 207 220 return True 208 221 222 def display_fileupload(self, filename): 223 if filename[1] == 'res_stat' \ 224 and self.target is not None \ 225 and not self.target.startswith('tsc'): 226 return False 227 if filename[1] == 'eligibility' \ 228 and self.target is not None \ 229 and not self.target.startswith('tsc'): 230 return False 231 return True 232 209 233 @property 210 234 def form_fields(self): … … 225 249 form_fields['reg_number'].for_display = True 226 250 return form_fields 251 252 def dataNotComplete(self, data): 253 store = getUtility(IExtFileStore) 254 if self.context.__parent__.with_picture \ 255 and self.context.__parent__.picture_editable: 256 store = getUtility(IExtFileStore) 257 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 258 return _('No passport picture uploaded.') 259 if self.target is not None \ 260 and self.target.startswith('tscf') \ 261 and not store.getFileByContext(self.context, attr=u'res_stat.pdf'): 262 return _('No statement of result pdf file uploaded.') 263 #if self.target is not None \ 264 # and self.target.startswith('tsc') \ 265 # and not store.getFileByContext(self.context, attr=u'eligibility.pdf'): 266 # return _('No eligibility form pdf file uploaded.') 267 return False 268 269 class ResultStatement(AdditionalFile): 270 grok.name('res_stat') 271 272 class EligibilityForm(AdditionalFile): 273 grok.name('eligibility') -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py
r17039 r17041 31 31 """A collection of parameters and methods subject to customization. 32 32 """ 33 34 ADDITIONAL_FILES = ( 35 ('Eligibility Form','eligibility'), 36 ('Statement of Result','res_stat'), 37 ) 33 38 34 39 SEPARATORS_DICT = {
Note: See TracChangeset for help on using the changeset viewer.