Skip to content

Commit

Permalink
Merge PR #644 from @zonky2
Browse files Browse the repository at this point in the history
Fix show limit at editAll for move and copy
  • Loading branch information
stefanheimes committed Jul 31, 2024
2 parents 188cc5c + 8c0da32 commit 4ce0e24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,21 @@ protected function renderTemplate(ContaoBackendViewTemplate $template, Environme

$showColumn = $this->getViewSection($definition)->getListingConfig()->getShowColumns();

// Fixup form action for edit multiple selection screens.
$action = StringUtil::ampersand(Environment::get('request'));
if (
('tl_select' === $provider->getValue('TL_SUBMIT'))
&& (null !== $provider->getValue('edit'))
&& str_contains($action, 'select=models')
) {
$action = str_replace('select=models', 'select=properties', $action);
}

$template
->set('subHeadline', $this->translator->trans('select_models', [], 'dc-general'))
->set('tableName', ($definition->getName() ?: 'none'))
->set('select', 'select' === $provider->getParameter('act'))
->set('action', StringUtil::ampersand(Environment::get('request')))
->set('action', $action)
->set('selectButtons', $this->getSelectButtons($environment))
->set('sortable', $this->isSortable($environment))
->set('showColumns', $showColumn)
Expand All @@ -452,13 +462,6 @@ protected function renderTemplate(ContaoBackendViewTemplate $template, Environme
->set('selectCheckBoxName', 'models[]')
->set('selectCheckBoxIdPrefix', 'models_')
->set('selectContainer', $this->getSelectContainer($environment));

if (
(null !== $template->get('action'))
&& (str_contains($template->get('action'), 'select=models'))
) {
$template->set('action', str_replace('select=models', 'select=properties', $template->get('action')));
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/Contao/View/Contao2BackendView/EditMask.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
use ContaoCommunityAlliance\DcGeneral\Data\ModelInterface;
use ContaoCommunityAlliance\DcGeneral\Data\MultiLanguageDataProviderInterface;
use ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag;
use ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBagInterface;
use ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface;
use ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface;
use ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\PropertiesDefinitionInterface;
Expand Down

0 comments on commit 4ce0e24

Please sign in to comment.