Commit e0d8e66b authored by webchick's avatar webchick

Issue #2119881 by damiankloip, dawehner | joachim: Fixed views BulkFormBase...

Issue #2119881 by damiankloip, dawehner | joachim: Fixed views BulkFormBase shows 'Apply' button twice.
parent 43997091
...@@ -49,6 +49,10 @@ public function testBulkForm() { ...@@ -49,6 +49,10 @@ public function testBulkForm() {
$this->drupalGet('test_bulk_form'); $this->drupalGet('test_bulk_form');
// Test that the views edit header appears first.
$first_form_element = $this->xpath('//form/div/div[1][@id = :id]', array(':id' => 'edit-header'));
$this->assertTrue($first_form_element, 'The views form edit header appears first.');
$this->assertFieldById('edit-action', NULL, 'The action select field appears.'); $this->assertFieldById('edit-action', NULL, 'The action select field appears.');
// Make sure a checkbox appears on all rows. // Make sure a checkbox appears on all rows.
......
...@@ -1234,8 +1234,9 @@ function views_pre_render_views_form_views_form($element) { ...@@ -1234,8 +1234,9 @@ function views_pre_render_views_form_views_form($element) {
// Apply substitutions to the rendered output. // Apply substitutions to the rendered output.
$element['output']['#markup'] = str_replace($search, $replace, $element['output']['#markup']); $element['output']['#markup'] = str_replace($search, $replace, $element['output']['#markup']);
// Render and add remaining form fields. // Sort, render and add remaining form fields.
$element['#children'] = drupal_render_children($element); $children = element_children($element, TRUE);
$element['#children'] = drupal_render_children($element, $children);
return $element; return $element;
} }
......
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