Skip to content

feat: send post request if toolbar button has cms-form-post-method class #7890

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

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Apr 24, 2024

Description

This PR adds the ability to define toolbar buttons that send POST requests, which is needed for any button changing the database state of the system, e.g., lock, unlock, publish, new draft, ...

Versioning uses its own little js file to add click events to buttons marked by the classcms-form-post-method. With this PR, any package can send POST requests by adding the class.

When the toolbar is updated, all events are lost. Therefore, this fixes django-cms/djangocms-versioning#402

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun merged commit a999820 into django-cms:release/4.1.x Apr 24, 2024
@fsbraun fsbraun deleted the fix/toolbar-post-button branch January 10, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant