Changeset 8160 for main/waeup.kofa/trunk
- Timestamp:
- 15 Apr 2012, 06:40:01 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/interfaces.py
r7819 r8160 22 22 from waeup.kofa.interfaces import IKofaObject 23 23 from waeup.kofa.interfaces import MessageFactory as _ 24 from waeup.kofa.schema import FormattedDate 24 25 25 26 class IAccessCode(IKofaObject): … … 60 61 """A factory for batches of access codes. 61 62 """ 62 creation_date = schema.Date(63 creation_date = FormattedDate( 63 64 title = _(u'Creation date'), 64 65 ) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8150 r8160 52 52 from waeup.kofa.students.interfaces import IStudentsUtils 53 53 from waeup.kofa.utils.helpers import string_from_bytes, file_size 54 from waeup.kofa.widgets.datewidget import ( 55 FriendlyDateWidget, FriendlyDateDisplayWidget, 56 FriendlyDatetimeDisplayWidget) 54 from waeup.kofa.widgets.datewidget import FriendlyDateDisplayWidget 57 55 from waeup.kofa.widgets.phonewidget import PhoneWidget 58 56 from waeup.kofa.widgets.restwidget import ReSTDisplayWidget … … 153 151 form_fields = grok.AutoFields( 154 152 IApplicantsContainerAdd).omit('code').omit('title') 155 form_fields['startdate'].custom_widget = FriendlyDateWidget('le')156 form_fields['enddate'].custom_widget = FriendlyDateWidget('le')157 153 158 154 def update(self): … … 226 222 227 223 form_fields = grok.AutoFields(IApplicantsContainer).omit('title') 228 form_fields['startdate'].custom_widget = FriendlyDateDisplayWidget('le')229 form_fields['enddate'].custom_widget = FriendlyDateDisplayWidget('le')230 224 form_fields['description'].custom_widget = ReSTDisplayWidget 231 225 … … 257 251 tabthreeactions2 = [_('Add local role')] 258 252 # Use friendlier date widget... 259 form_fields['startdate'].custom_widget = FriendlyDateWidget('le')260 form_fields['enddate'].custom_widget = FriendlyDateWidget('le')261 253 grok.require('waeup.manageApplication') 262 254 … … 497 489 grok.require('waeup.viewApplication') 498 490 form_fields = grok.AutoFields(IApplicantOnlinePayment) 499 form_fields[500 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')501 form_fields[502 'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')503 491 pnav = 3 504 492 … … 546 534 grok.require('waeup.viewApplication') 547 535 form_fields = grok.AutoFields(IApplicantOnlinePayment) 548 form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')549 form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')536 #form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le') 537 #form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le') 550 538 prefix = 'form' 551 539 … … 754 742 'screening_score', 755 743 ) 756 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')757 744 form_fields['phone'].custom_widget = PhoneWidget 758 745 form_fields['applicant_id'].for_display = True -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r8154 r8160 221 221 """Content as language dictionary with values in HTML format.""") 222 222 223 startdate = schema.Date(223 startdate = FormattedDate( 224 224 title = _(u'Application Start Date'), 225 225 required = False, 226 ) 227 228 enddate = schema.Date( 226 show_year = False, 227 ) 228 229 enddate = FormattedDate( 229 230 title = _(u'Application Closing Date'), 230 231 required = False, 232 show_year = False, 231 233 ) 232 234 -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r7931 r8160 20 20 from waeup.kofa.interfaces import IKofaObject, SimpleKofaVocabulary 21 21 from waeup.kofa.interfaces import MessageFactory as _ 22 from waeup.kofa.schema import FormattedDatetime 22 23 23 24 payment_states = SimpleKofaVocabulary( … … 68 69 ) 69 70 70 creation_date = schema.Datetime(71 creation_date = FormattedDatetime( 71 72 title = _(u'Ticket Creation Date'), 72 73 readonly = False, 73 74 ) 74 75 75 payment_date = schema.Datetime(76 payment_date = FormattedDatetime( 76 77 title = _(u'Payment Date'), 77 78 required = False, … … 171 172 readonly = False, 172 173 ) 174 175 class IOnlinePaymentImportExport(IOnlinePayment): 176 """A base representation of payments. 177 178 """ 179 180 creation_date = schema.Datetime( 181 title = _(u'Ticket Creation Date'), 182 readonly = False, 183 ) 184 185 payment_date = schema.Datetime( 186 title = _(u'Payment Date'), 187 required = False, 188 readonly = False, 189 ) 190 191 -
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r7959 r8160 40 40 IStudentUpdateByRegNo, IStudentUpdateByMatricNo, 41 41 IStudentStudyLevel, ICourseTicket, 42 IStudentOnlinePayment , IStudentVerdictUpdate)42 IStudentOnlinePaymentImportExport, IStudentVerdictUpdate) 43 43 from waeup.kofa.students.workflow import IMPORTABLE_STATES 44 44 from waeup.kofa.utils.batching import BatchProcessor … … 539 539 540 540 name = u'Payment Processor' 541 iface = IStudentOnlinePayment 541 iface = IStudentOnlinePaymentImportExport 542 542 factory_name = 'waeup.StudentOnlinePayment' 543 543 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8143 r8160 45 45 IKofaUtils, IUniversity) 46 46 from waeup.kofa.interfaces import MessageFactory as _ 47 from waeup.kofa.widgets.datewidget import ( 48 FriendlyDateWidget, FriendlyDateDisplayWidget, 49 FriendlyDatetimeDisplayWidget) 47 from waeup.kofa.widgets.datewidget import FriendlyDateDisplayWidget 50 48 from waeup.kofa.widgets.restwidget import ReSTDisplayWidget 51 49 from waeup.kofa.widgets.phonewidget import PhoneWidget … … 419 417 else: 420 418 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 421 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')422 419 return form_fields 423 420 … … 442 439 else: 443 440 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 444 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')445 441 return form_fields 446 442 … … 487 483 else: 488 484 form_fields = grok.AutoFields(IUGStudentClearance) 489 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')490 485 return form_fields 491 486 … … 1119 1114 grok.require('waeup.viewStudent') 1120 1115 form_fields = grok.AutoFields(IStudentOnlinePayment) 1121 form_fields[1122 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')1123 form_fields[1124 'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')1125 1116 pnav = 4 1126 1117 … … 1189 1180 grok.require('waeup.viewStudent') 1190 1181 form_fields = grok.AutoFields(IStudentOnlinePayment) 1191 form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')1192 form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')1182 #form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le') 1183 #form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le') 1193 1184 prefix = 'form' 1194 1185 title = 'Payment Data' … … 1376 1367 grok.require('waeup.handleAccommodation') 1377 1368 form_fields = grok.AutoFields(IBedTicket) 1378 form_fields[1379 'booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')1380 1369 pnav = 4 1381 1370 … … 1392 1381 grok.require('waeup.handleAccommodation') 1393 1382 form_fields = grok.AutoFields(IBedTicket) 1394 form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le')1383 #form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le') 1395 1384 prefix = 'form' 1396 1385 … … 1643 1632 else: 1644 1633 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 1645 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')1646 1634 return form_fields 1647 1635 -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r8057 r8160 29 29 30 30 class StudentsExporter(grok.GlobalUtility, ExporterBase): 31 """Exporter for Applicants.31 """Exporter for Students. 32 32 """ 33 33 grok.implements(ICSVExporter) -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r8069 r8160 24 24 IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils) 25 25 from waeup.kofa.interfaces import MessageFactory as _ 26 from waeup.kofa.schema import TextLineChoice 26 from waeup.kofa.schema import TextLineChoice, FormattedDate, FormattedDatetime 27 27 from waeup.kofa.students.vocabularies import ( 28 28 StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source, 29 29 GenderSource, nats_vocab, 30 30 ) 31 from waeup.kofa.payments.interfaces import IPaymentsContainer, IOnlinePayment 31 from waeup.kofa.payments.interfaces import ( 32 IPaymentsContainer, IOnlinePayment, IOnlinePaymentImportExport) 32 33 from waeup.kofa.university.vocabularies import ( 33 34 CourseSource, StudyModeSource, CertificateSource) … … 215 216 216 217 """ 217 date_of_birth = schema.Date(218 date_of_birth = FormattedDate( 218 219 title = _(u'Date of Birth'), 219 220 required = True, 221 show_year = True, 220 222 ) 221 223 … … 465 467 ) 466 468 467 booking_date = schema.Datetime(469 booking_date = FormattedDatetime( 468 470 title = _(u'Booking Date'), 469 471 required = False, … … 500 502 'p_item'].order 501 503 504 505 class IStudentOnlinePaymentImportExport(IOnlinePaymentImportExport): 506 """A student payment for import and export. 507 508 """ 509 p_session = schema.Choice( 510 title = _(u'Payment Session'), 511 source = academic_sessions_vocab, 512 required = False, 513 ) 514 502 515 class IStudentChangePassword(IKofaObject): 503 516 """Interface needed for change pasword page. 504 517 505 518 """ 506 507 519 reg_number = schema.TextLine( 508 520 title = _(u'Registration Number'), -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_payment_data.csv
r7626 r8160 1 1 p_state,p_category,r_pay_reference,r_desc,p_id,reg_number,session_id,r_amount_approved,p_item,amount_auth,r_card_num,r_code,creation_date,type,surcharge_1 2 2 paid,schoolfee,GTB|WEB|FUT|26-11-2010|002295,Approved Successful,3816951290797973744#,1,2010,19500,BTECHBDT,19500,0942,00,2010/11/26 19:59:33.744 GMT+1,online,0 3 unpaid,schoolfee,GTB|WEB|FUT|25-11-2010|,Transaction status unconfirmed,3816951290712593757,2,2010,0,BTECHBDT,19500,0942,Z0,2010 /11/25 20:16:33.757 GMT+1,online,04 paid,schoolfee,UBA|WEB|FUT|15-02-2010|000517,Approved Successful,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01 .955 GMT+1,online,03 unpaid,schoolfee,GTB|WEB|FUT|25-11-2010|,Transaction status unconfirmed,3816951290712593757,2,2010,0,BTECHBDT,19500,0942,Z0,2010-11-25 20:16:33.757 GMT+1,online,0 4 paid,schoolfee,UBA|WEB|FUT|15-02-2010|000517,Approved Successful,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01,online,0
Note: See TracChangeset for help on using the changeset viewer.