Alex_1
(Fedorov)
February 3, 2022, 8:55am
1
Hello everyone.
Is it possible to open content type action in modal dialog? For example, for the rename action, this is implemented as follows.
<property name="modal" type="text">{}</property>
<property name="description" i18n:translate=""></property>
<property
name="url_expr">string:$object_url/object_rename</property>
<property name="icon_expr">string:plone-rename</property>
<property
name="available_expr">python:checkPermission("Delete objects", globals_view.getParentObject()) and checkPermission("Copy or Move", object) and checkPermission("Add portal content", object) and not globals_view.isPortalOrPortalDefaultPage()</property>
<property name="permissions">
<element value="Add portal content"/>
</property>
<property name="visible">True</property>
<property name="modal" type="text">{}</property>
</object>
<object name="redirection" meta_type="CMF Action" i18n:domain="plone">
<property name="title" i18n:translate="">URL Management</property>
<property name="description" i18n:translate=""></property>
<property
name="url_expr">string: ${object_url}/@@manage-aliases</property>
<property name="icon_expr">string:plone-redirection</property>
<property name="available_expr">python:not globals_view.isPortalOrPortalDefaultPage()</property>
<property name="permissions">
<element value="Manage Context Aliases"/>
But I need to do the same only for the action defined in types/File.xml. For example an action like this one:
<action title="Download" action_id="download" category="object"
condition_expr="member" url_expr="string:${object_url}/download"
visible="False" i18n:attributes="title">
yurj
(Yuri)
February 3, 2022, 9:24am
2
Check the login
action in ZMI, there's a modal example, maybe can help?
mtrebron
(Norbert )
February 5, 2022, 12:12pm
3
As a last resort, you could insert the class pat-plone-modal
using Diazo rules. See Mockup
espenmn
(Espen)
February 8, 2022, 1:45pm
4
Slightly off topic, but I noticed (when trying to upgrade collective.googleauthentication ) that the login form at http://site/login is (can be) overridden by 'skins', while the popup-form is not ( Plone 5.2.6 )