Commit 3c2bee1d authored by alexpott's avatar alexpott

Issue #2067881 by ZenDoodles, mradcliffe: Fixed Search is missing from block...

Issue #2067881 by ZenDoodles, mradcliffe: Fixed Search is missing from block admin UI after installation.
parent 499080f3
......@@ -287,10 +287,7 @@ public function buildForm(array $form, array &$form_state) {
'block-list-right',
);
$form['right']['list']['#type'] = 'container';
$form['right']['list']['#attributes']['class'][] = 'entity-meta';
$form['right']['list']['title'] = array(
$form['right']['title'] = array(
'#type' => 'container',
'#children' => '<h3>' . t('Place blocks') . '</h3>',
'#attributes' => array(
......@@ -299,7 +296,8 @@ public function buildForm(array $form, array &$form_state) {
),
),
);
$form['right']['list']['search'] = array(
$form['right']['filter'] = array(
'#type' => 'search',
'#title' => t('Filter'),
'#title_display' => 'invisible',
......@@ -312,6 +310,9 @@ public function buildForm(array $form, array &$form_state) {
),
);
$form['right']['list']['#type'] = 'container';
$form['right']['list']['#attributes']['class'][] = 'entity-meta';
// Sort the plugins first by category, then by label.
$plugins = $this->blockManager->getDefinitions();
uasort($plugins, function ($a, $b) {
......
......@@ -39,6 +39,12 @@ function setUp() {
* Test that the search form block can be placed and works.
*/
protected function testSearchFormBlock() {
// Test availability of the search block in the admin "Place blocks" list.
$this->drupalGet('admin/structure/block');
$this->assertLinkByHref('/admin/structure/block/add/search_form_block/stark', 0,
'Did not find the search block in block candidate list.');
$block = $this->drupalPlaceBlock('search_form_block');
$this->drupalGet('');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment