source: main/waeup.fceokene/trunk/src/waeup/fceokene/students/browser.py @ 9066

Last change on this file since 9066 was 8913, checked in by Henrik Bettermann, 12 years ago

Merged with waeup.aaue 8910:HEAD.

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1## $Id: browser.py 8913 2012-07-04 10:21:05Z henrik $
2##
3## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18import grok
19from zope.i18n import translate
20from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
21from kofacustom.nigeria.students.browser import (
22    NigeriaOnlinePaymentDisplayFormPage,
23    NigeriaOnlinePaymentAddFormPage,
24    NigeriaExportPDFPaymentSlipPage)
25
26from waeup.fceokene.students.interfaces import ICustomStudentOnlinePayment
27
28class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage):
29    """ Page to view an online payment ticket
30    """
31    grok.context(ICustomStudentOnlinePayment)
32    form_fields = grok.AutoFields(ICustomStudentOnlinePayment)
33    form_fields[
34        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
35    form_fields[
36        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
37
38class CustomOnlinePaymentAddFormPage(NigeriaOnlinePaymentAddFormPage):
39    """ Page to add an online payment ticket
40    """
41    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).select(
42        'p_category')
43
44class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage):
45    """Deliver a PDF slip of the context.
46    """
47    grok.context(ICustomStudentOnlinePayment)
48    form_fields = grok.AutoFields(ICustomStudentOnlinePayment)
49    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
50    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
Note: See TracBrowser for help on using the repository browser.