Changeset 17094
- Timestamp:
- 14 Sep 2022, 08:14:28 (2 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r17016 r17094 4 4 1.7.2.dev0 (unreleased) 5 5 ======================= 6 7 * Add MonthSource to be used in custom packages. 6 8 7 9 * Add `BalancePaymentAddFormPage` which can only be opened by managers. -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r16531 r17094 156 156 DICT_NAME = 'DISABLE_PAYMENT_GROUP_DICT' 157 157 158 class MonthSource(BasicSourceFactory): 159 """A months source delivers all months of the year. 160 """ 161 def getValues(self): 162 months_dict = getUtility(IKofaUtils).MONTHS_DICT 163 return sorted(months_dict.keys()) 164 165 def getToken(self, value): 166 return value 167 168 def getTitle(self, value): 169 months_dict = getUtility(IKofaUtils).MONTHS_DICT 170 return months_dict[value] 171 158 172 # Define a validation method for email addresses 159 173 class NotAnEmailAddress(schema.ValidationError): … … 311 325 312 326 PORTAL_LANGUAGE = Attribute("Dict of global language setting") 327 MONTHS_DICT = Attribute("Dict of months of the year") 313 328 PREFERRED_LANGUAGES_DICT = Attribute("Dict of preferred languages") 314 329 EXAM_SUBJECTS_DICT = Attribute("Dict of examination subjects") -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r17067 r17094 102 102 } 103 103 104 MONTHS_DICT = { 105 1: _('January'), 106 2: _('February'), 107 3: _('March'), 108 4: _('April'), 109 5: _('May'), 110 6: _('June'), 111 7: _('July'), 112 8: _('August'), 113 9: _('September'), 114 10: _('October'), 115 11: _('November'), 116 12: _('December'), 117 } 118 104 119 #: A function to return 105 120 @classmethod
Note: See TracChangeset for help on using the changeset viewer.