source: main/waeup.futminna/trunk/src/waeup/futminna/students/browser.py @ 13459

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

Adjust to changes made in base package.

  • Property svn:keywords set to Id
File size: 2.6 KB
RevLine 
[8911]1## $Id: browser.py 9991 2013-02-24 17:45:30Z 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
[9403]21from waeup.kofa.students.browser import BedTicketAddPage
[8911]22from kofacustom.nigeria.students.browser import (
23    NigeriaOnlinePaymentDisplayFormPage,
24    NigeriaOnlinePaymentAddFormPage,
25    NigeriaExportPDFPaymentSlipPage)
[9403]26from waeup.kofa.interfaces import MessageFactory as _
[8911]27
[8912]28from waeup.futminna.students.interfaces import ICustomStudentOnlinePayment
[8911]29
30class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage):
31    """ Page to view an online payment ticket
32    """
33    grok.context(ICustomStudentOnlinePayment)
[9785]34    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).omit(
[9991]35        'provider_amt', 'gateway_amt', 'thirdparty_amt', 'p_item')
[8911]36    form_fields[
37        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
38    form_fields[
39        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
40
41class CustomOnlinePaymentAddFormPage(NigeriaOnlinePaymentAddFormPage):
42    """ Page to add an online payment ticket
43    """
44    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).select(
45        'p_category')
46
47class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage):
48    """Deliver a PDF slip of the context.
49    """
50    grok.context(ICustomStudentOnlinePayment)
[9785]51    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).omit(
[9991]52        'provider_amt', 'gateway_amt', 'thirdparty_amt', 'p_item')
[8911]53    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
[9403]54    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
55
56class CustomBedTicketAddPage(BedTicketAddPage):
57    """ Page to add an online payment ticket
58    """
59    buttonname = _('Create bed ticket')
60    notice = ''
61    with_ac = False
Note: See TracBrowser for help on using the repository browser.