1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Fix issue with multi-template settings not always updating the selectable columns on columns tab

This commit is contained in:
Ryan Cramer
2017-04-16 06:46:31 -04:00
parent 93d1be8453
commit bb12873a19

View File

@@ -584,7 +584,7 @@ class ProcessPageLister extends Process implements ConfigurableModule {
*/ */
public function buildColumnsField() { public function buildColumnsField() {
$fields = $this->template ? $this->template->fieldgroup : $this->wire('fields'); $fields = $this->wire('fields');
$options = $this->getSystemColumns(); $options = $this->getSystemColumns();
/** @var InputfieldAsmSelect $f */ /** @var InputfieldAsmSelect $f */
@@ -1062,6 +1062,8 @@ class ProcessPageLister extends Process implements ConfigurableModule {
$subname = ''; $subname = '';
if(strpos($name, '.')) list($name, $subname) = explode('.', $name); if(strpos($name, '.')) list($name, $subname) = explode('.', $name);
$field = $this->template ? $this->template->fieldgroup->getField($name, true) : $this->fields->get($name); $field = $this->template ? $this->template->fieldgroup->getField($name, true) : $this->fields->get($name);
if(!$field && $this->template) $field = $this->fields->get($name);
$label = $field ? $field->getLabel() : ''; $label = $field ? $field->getLabel() : '';
if(!$label) $label = isset($systemLabels[$name]) ? $systemLabels[$name] : $name; if(!$label) $label = isset($systemLabels[$name]) ? $systemLabels[$name] : $name;
$icon = $field ? $field->getIcon(true) : ''; $icon = $field ? $field->getIcon(true) : '';