Ignore:
Timestamp:
2 Aug 2017, 07:54:45 (7 years ago)
Author:
Henrik Bettermann
Message:

Add field to enable/disable the Remita views.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/browser/pages.py

    r12962 r14742  
    2020
    2121import grok
     22from waeup.kofa.browser.pages import (
     23    SessionConfigurationAddFormPage,
     24    SessionConfigurationManageFormPage,
     25    ConfigurationContainerManageFormPage,
     26    SourcesOverview)
    2227from waeup.kofa.browser.layout import KofaPage
    23 from waeup.kofa.browser.pages import SourcesOverview
    2428from kofacustom.nigeria.interfaces import (
    25     high_qual, high_grade, exam_types, LGASource)
     29    high_qual, high_grade, exam_types, LGASource,
     30    ICustomSessionConfiguration,
     31    ICustomSessionConfigurationAdd)
    2632from kofacustom.nigeria.interfaces import MessageFactory as _
    2733
     
    5965        return
    6066
    61 
    6267class NigeriaSourcesOverviewPage(KofaPage, NigeriaSourcesOverview):
    6368    grok.name('sources')
     
    6570    label = _(u'Sources & Vocabularies')
    6671    pnav = 0
     72
     73class CustomSessionConfigurationAddFormPage(SessionConfigurationAddFormPage):
     74    """Add a session configuration object to configuration container.
     75    """
     76    form_fields = grok.AutoFields(ICustomSessionConfigurationAdd)
     77
     78class CustomSessionConfigurationManageFormPage(
     79    SessionConfigurationManageFormPage):
     80    """Manage session configuration object.
     81    """
     82    form_fields = grok.AutoFields(ICustomSessionConfiguration)
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interfaces.py

    r12923 r14742  
    9292        return self.lga_dict.get(value,
    9393            _('Invalid key: ${a}', mapping = {'a':value}))
     94
     95class ICustomSessionConfiguration(ISessionConfiguration):
     96    """A session configuration object.
     97    """
     98
     99    remita_enabled = schema.Bool(
     100        title = _(u'Remita integration enabled'),
     101        default = False,
     102        )
     103
     104class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
     105    """A session configuration object in add mode.
     106    """
     107
     108    academic_session = schema.Choice(
     109        title = _(u'Academic Session'),
     110        source = academic_sessions_vocab,
     111        default = None,
     112        required = True,
     113        readonly = False,
     114        )
     115
     116ICustomSessionConfigurationAdd[
     117    'academic_session'].order =  ICustomSessionConfiguration[
     118    'academic_session'].order
Note: See TracChangeset for help on using the changeset viewer.