Skip to content

Commit

Permalink
related PrestaShop#35591 - bug 10 : remove only Done button
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed May 31, 2024
1 parent 38d5dbc commit 482ea79
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,12 @@ export default class PositionExtension {
*/
private setReorderButtonLabel(): void {
const rearrangeButton = this.getReorderButton();
const label = this.isPositionsReorderActive()
? rearrangeButton.data('label-save')
: rearrangeButton.data('label-reorder');
rearrangeButton.html(label);

if (this.isPositionsReorderActive()) {
rearrangeButton.hide();
} else {
rearrangeButton.data('label-reorder');
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ protected function getFilters()
])
->setAssociatedColumn('name')
)
->add((new Filter('position', ReorderPositionsButtonType::class))
->setAssociatedColumn('position')
)
->add((new Filter('actions', SearchAndResetType::class))
->setAssociatedColumn('actions')
->setTypeOptions([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ protected function getFilters()
])
->setAssociatedColumn('name')
)
->add((new Filter('position', ReorderPositionsButtonType::class))
->setAssociatedColumn('position')
)
->add((new Filter('actions', SearchAndResetType::class))
->setAssociatedColumn('actions')
->setTypeOptions([
Expand Down

0 comments on commit 482ea79

Please sign in to comment.