Skip to content

Commit

Permalink
Merge pull request #16313 from craftcms/bugfix/16310-tags-replace-ele…
Browse files Browse the repository at this point in the history
…ment-action

tags shouldn't have replace action
  • Loading branch information
brandonkelly authored Dec 11, 2024
2 parents 665c919 + a3bfda4 commit 326688d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Fixed a bug where Tags fields had “Replace” actions. ([#16310](https://github.com/craftcms/cms/issues/16310))
- Fixed a styling issue in Safari. ([#16298](https://github.com/craftcms/cms/issues/16298))

## 5.5.6 - 2024-12-10
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions src/web/assets/cp/src/js/BaseElementSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,16 @@ Craft.BaseElementSelectInput = Garnish.Base.extend(
}

if (this.settings.allowRemove) {
actions.push({
icon: 'arrows-rotate',
label: Craft.t('app', 'Replace'),
callback: () => {
this._$replaceElement = $element;
this.showModal();
},
});
if (this.settings.elementType) {
actions.push({
icon: 'arrows-rotate',
label: Craft.t('app', 'Replace'),
callback: () => {
this._$replaceElement = $element;
this.showModal();
},
});
}

actions.push({
icon: 'remove',
Expand Down

0 comments on commit 326688d

Please sign in to comment.