Changeset 16387


Ignore:
Timestamp:
27 Jan 2021, 09:57:32 (4 years ago)
Author:
Henrik Bettermann
Message:

Disable clearance request button if not in state 'clearance started'.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r16327 r16387  
    441.6.1.dev0 (unreleased)
    55=======================
     6
     7* Disable clearance request button if not in state 'clearance started'.
    68
    79* Make maximum number of applicants on `ApplicantsContainerManageFormPage`
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r16329 r16387  
    938938        return form_fields
    939939
     940    @property
     941    def do_not_render_buttons(self):
     942        if self.context.state != CLEARANCE:
     943            return ('Save and request clearance',)
     944        return ()
     945
    940946    @action(_('Save'), style='primary')
    941947    def save(self, **data):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/clearanceeditpage.pt

    r13104 r16387  
    2424      <br />
    2525      <div tal:condition="view/availableActions">
    26         <input tal:repeat="action view/actions"
    27                tal:replace="structure action/render"
    28                />
     26        <span tal:repeat="action view/actions"
     27        tal:omit-tag="">
     28          <input tal:replace="structure action/render"
     29                 tal:condition="python:action.label not in view.do_not_render_buttons"
     30                 />
     31        </span>
    2932      </div>
    3033    </div>
Note: See TracChangeset for help on using the changeset viewer.