{% load i18n creme_widgets %}{% load blockjsondata from creme_core_tags %} {% if user.is_superuser %} {% if button.sandbox_uuid is None %} {# {% translate 'Are you sure you want to restrict this entity to superusers?' as confirm_msg %} #} {# #} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Restrict to superusers' %} {% blockjsondata %}{ "data": { "id": {{object.id}}, "set": true }, "options": { "confirm": "{% translate 'Are you sure you want to restrict this entity to superusers?' %}" } }{% endblockjsondata %} {% elif button.sandbox_uuid == button.UUID_SANDBOX_SUPERUSERS %} {# {% translate 'Are you sure you want this entity to be accessible to regular users?' as confirm_msg %} #} {# #} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Not restrict to superusers' %} {% blockjsondata %}{ "data": { "id": {{object.id}}, "set": false }, "options": { "confirm": "{% translate 'Are you sure you want this entity to be accessible to regular users?' %}" } }{% endblockjsondata %} {% else %} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Restrict to superusers' %} {% endif %}{% endif %}