mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '4.11' into 4
This commit is contained in:
commit
b62c4a9f53
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
inherit: true
|
|
||||||
|
|
||||||
build:
|
|
||||||
environment:
|
|
||||||
variables:
|
|
||||||
# Must match actual branch, not alias. E.g. 4.x-dev rather than 4.1.x-dev for 4 branch, but 4.0.x-dev for 4.0 branch
|
|
||||||
COMPOSER_ROOT_VERSION: 4.x-dev
|
|
||||||
nodes:
|
|
||||||
analysis:
|
|
||||||
tests:
|
|
||||||
override: [php-scrutinizer-run]
|
|
||||||
|
|
||||||
filter:
|
|
||||||
paths:
|
|
||||||
- src/*
|
|
||||||
- tests/*
|
|
@ -362,7 +362,7 @@ class GridFieldFilterHeader extends AbstractGridFieldComponent implements GridFi
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($searchFields->getIterator() as $field) {
|
foreach ($searchFields->getIterator() as $field) {
|
||||||
$field->addExtraClass('stacked');
|
$field->addExtraClass('stacked no-change-track');
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = $gridField->Title ?: singleton($gridField->getModelClass())->i18n_plural_name();
|
$name = $gridField->Title ?: singleton($gridField->getModelClass())->i18n_plural_name();
|
||||||
|
@ -139,4 +139,21 @@ class GridFieldFilterHeaderTest extends SapphireTest
|
|||||||
'GridFieldFilterHeader::handleAction resets the gridstate filter when the user resets the search.'
|
'GridFieldFilterHeader::handleAction resets the gridstate filter when the user resets the search.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetSearchForm()
|
||||||
|
{
|
||||||
|
$searchForm = $this->component->getSearchForm($this->gridField);
|
||||||
|
|
||||||
|
$this->assertTrue($searchForm instanceof Form);
|
||||||
|
$this->assertEquals('Search__Name', $searchForm->fields[0]->Name);
|
||||||
|
$this->assertEquals('Search__City', $searchForm->fields[1]->Name);
|
||||||
|
$this->assertEquals('Search__Cheerleader__Hat__Colour', $searchForm->fields[2]->Name);
|
||||||
|
$this->assertEquals('TeamsSearchForm', $searchForm->Name);
|
||||||
|
$this->assertEquals('cms-search-form', $searchForm->extraClasses['cms-search-form']);
|
||||||
|
|
||||||
|
foreach ($searchForm->fields as $field) {
|
||||||
|
$this->assertEquals('stacked', $field->extraClasses['stacked']);
|
||||||
|
$this->assertEquals('no-change-track', $field->extraClasses['no-change-track']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user