Changeset 17017


Ignore:
Timestamp:
10 Jul 2022, 11:19:42 (2 years ago)
Author:
Henrik Bettermann
Message:

Add buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r17016 r17017  
    5050from waeup.kofa.applicants.applicant import search
    5151from waeup.kofa.applicants.workflow import (
    52     INITIALIZED, STARTED, PAID, SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED)
     52    INITIALIZED, STARTED, PAID, SUBMITTED,
     53    ADMITTED, NOT_ADMITTED, CREATED, PROCESSED)
    5354from waeup.kofa.browser import (
    5455#    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     
    10671068    pnav = 3
    10681069    display_actions = [[_('Save'), _('Finally Submit')],
    1069         [_('Add online payment ticket'),_('Remove selected tickets')]]
     1070        [_('Add online payment ticket'),
     1071         _('Add balance payment ticket'),
     1072         _('Remove selected tickets')]]
    10701073
    10711074    @property
     
    12551258        return
    12561259
     1260    @action(_('Add balance payment ticket'), style='primary')
     1261    def addBalancePaymentTicket(self, **data):
     1262        self.redirect(self.url(self.context, '@@addbp'))
     1263        return
     1264
    12571265    @jsaction(_('Remove selected tickets'))
    12581266    def removePaymentTickets(self, **data):
     
    12801288    submit_state = PAID
    12811289    mandate_days = 31
     1290    balance_payments_states = ()  # not used in base packe
    12821291
    12831292    @property
     
    13181327            actions = [[_('Save'), _('Finally Submit')],
    13191328                [_('Remove selected tickets')]]
     1329        if self.context.state in self.balance_payments_states:
     1330            actions[1].append(_('Add balance payment ticket'))
    13201331        return actions
    13211332
     
    13571368    def addPaymentTicket(self, **data):
    13581369        self.redirect(self.url(self.context, '@@addafp'))
     1370        return
     1371
     1372    @action(_('Add balance payment ticket'), style='primary')
     1373    def addBalancePaymentTicket(self, **data):
     1374        self.redirect(self.url(self.context, '@@addbp'))
    13591375        return
    13601376
Note: See TracChangeset for help on using the changeset viewer.