Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After click on Delete button empty modal window #126

Open
VerSooSet opened this issue Mar 19, 2017 · 6 comments
Open

After click on Delete button empty modal window #126

VerSooSet opened this issue Mar 19, 2017 · 6 comments

Comments

@VerSooSet
Copy link

VerSooSet commented Mar 19, 2017

What I did:

Trying delete theme plonetheme.business.casual
screenshot

What I expect to happen

deleting modal dialog

What actually happened:

the script was partially executed. Perhaps something was wrong and istead off message_text returns empty string. Besides if the dialog is closed on 'x', then the window disappears and the dark background remains. I have it only at new uploaded theme except copy of barcelonetta.

What version of Plone/ Addons I am using:

Plone 5.0.4.

@VerSooSet
Copy link
Author

The problem is described in more detail on #115. And that is a same another view only. Happened to solve it manually as the same way which described.

@gp54321
Copy link

gp54321 commented May 24, 2017

Well, I changed controlpanel.pt so:

--- controlpanel.pt	2017-03-16 22:10:31.000000000 +0000
+++ controlpanel.pt.new	2017-05-24 09:40:54.031135337 +0000
@@ -280,12 +280,11 @@
 
                             <a href="#" class="plone-btn plone-btn-danger pat-plone-modal"
                                 tal:condition="theme/editable"
-                                tal:attributes="href string:#modal-delete-${theme/name}"
+                                tal:attributes="href python:'#modal-delete-{0}'.format(theme['name'].replace('.', '-'))"
                                 i18n:translate="">Delete</a>
                                 <!-- Delete confirmation overlay -->
                             <div class="plone-modal"
-                                tal:attributes="id string:modal-delete-${theme/name}"
-                                tal:condition="theme/editable">
+                                tal:attributes="id python:'modal-delete-{0}'.format(theme['name'].replace('.', '-'))">
                                 <h1 class="documentFirstHeading" i18n:translate="theming_controlpanel_delete_confirm">
                                     Are you sure you want to delete <span
                                         tal:content="string:${theme/name}"

Result attached looks better

after

@VerSooSet
Copy link
Author

VerSooSet commented May 25, 2017

I checked your fix and confirmed it. Great!

@tkimnguyen
Copy link
Sponsor Member

@philipsahli
Copy link

The issue is still around in 5.1.2. Thanks @tkimnguyen for the link to the workaround by deleting or renaming the theme under portal_resources in the management interface. Would the fix by @gp54321 be accepted or are there any concerns?

@tkimnguyen
Copy link
Sponsor Member

@philipsahli I just ran into a similar problem because a theme had a space in its name or ID. If @gp54321 could make this a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants