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

Copy field values from other sites #14056

Open
wants to merge 107 commits into
base: 5.5
Choose a base branch
from

Conversation

brianjhanson
Copy link
Contributor

@brianjhanson brianjhanson commented Dec 18, 2023

Continuation of #12436 but instead of handling the copy server-side, the controller will return fragments of HTML that we use to replace fields and immediately save a draft. This simplifies the logic a bit as we can rely on existing "Save Draft" processes to save the values.

Description

On the entry/category edit page (elements that support autosaving drafts):

  • Added an item to the action menu that allows you to copy all, translatable, changed values from another site
  • translatable field icon now triggers a HUD, which contains a form that allows you to copy just that field’s value from the selected site;
    copy action is applied to the top-level fields (e.g. entire matrix field)
  • plugins need to implement CopyableFieldInterface to use this feature

IMPORTANT: once this feature is released, an update to craftcms/html-field needs to be released; craftcms/html-field#6

CleanShot.2023-12-19.at.13.44.44.mp4

i-just and others added 30 commits November 30, 2022 17:25
# Conflicts:
#	src/controllers/ElementsController.php
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
#	src/web/assets/cp/src/js/ElementEditor.js
@brianjhanson brianjhanson marked this pull request as ready for review November 4, 2024 15:33
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.

5 participants