Ignore:
Timestamp:
24 Jan 2024, 06:26:42 (10 months ago)
Author:
Henrik Bettermann
Message:

Show 'Remove' tick bullet on DatacenterImportStep2 only to user admin.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
2 edited

Legend:

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

    r17458 r17678  
    16331633    mode_locked = False
    16341634
     1635    @property
     1636    def show_remove_button(self):
     1637        return self.request.principal.id in ('admin', 'zope.manager', 'zope.mgr')
     1638
    16351639    def getPreviewHeader(self):
    16361640        """Get the header fields of attached CSV file.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt

    r11254 r17678  
    4646        disabled python: view.mode != 'update' and view.mode_locked and 'disabled' or ''" />
    4747        Update    
    48     <input type="radio" name="mode" value="remove"
     48    <input type="radio" name="mode" value="remove" tal:condition="view/show_remove_button"
    4949       tal:attributes="checked python: view.mode == 'remove' and 'checked' or '';
    5050        disabled python: view.mode != 'remove' and view.mode_locked and 'disabled' or ''" />
    51         Remove
     51        Remove <span tal:condition="not: view/show_remove_button">(N/A)</span>
    5252    <p>&nbsp;
    5353    </p>
Note: See TracChangeset for help on using the changeset viewer.