mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Fixes issue where nested columns forcibly hide
Eg: "myrelation[attribute]" as a column name would cause the list setup to hide these fields with no ability to bring them back
This commit is contained in:
parent
7731f37aac
commit
c644f8b66d
@ -117,10 +117,7 @@ class WidgetManager
|
||||
* Usage:
|
||||
* <pre>
|
||||
* WidgetManager::registerFormWidgets(function($manager){
|
||||
* $manager->registerFormWidget('Backend\FormWidgets\CodeEditor', [
|
||||
* 'name' => 'Code editor',
|
||||
* 'code' => 'codeeditor'
|
||||
* ]);
|
||||
* $manager->registerFormWidget('Backend\FormWidgets\CodeEditor', 'codeeditor');
|
||||
* });
|
||||
* </pre>
|
||||
*/
|
||||
|
@ -1312,7 +1312,7 @@ class Lists extends WidgetBase
|
||||
public function onApplySetup()
|
||||
{
|
||||
if (($visibleColumns = post('visible_columns')) && is_array($visibleColumns)) {
|
||||
$this->columnOverride = array_keys($visibleColumns);
|
||||
$this->columnOverride = $visibleColumns;
|
||||
$this->putSession('visible', $this->columnOverride);
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
<input
|
||||
type="hidden"
|
||||
name="column_order[]"
|
||||
value="<?= $column->columnName ?>" />
|
||||
value="<?= e($column->columnName) ?>" />
|
||||
<input
|
||||
id="<?= $this->getId('setupCheckbox-'.$column->columnName) ?>"
|
||||
name="visible_columns[<?= $column->columnName ?>]"
|
||||
value="1"
|
||||
name="visible_columns[]"
|
||||
value="<?= e($column->columnName) ?>"
|
||||
<?= $column->invisible ? '' : 'checked="checked"' ?>
|
||||
type="checkbox" />
|
||||
<label
|
||||
@ -63,4 +63,4 @@
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
<?= Form::close() ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user