Skip to content
This repository was archived by the owner on Sep 14, 2020. It is now read-only.

Commit d4b4ade

Browse files
committed
fixed export when massaction filter is applied
1 parent 704338e commit d4b4ade

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

app/code/community/BL/CustomGrid/Block/Widget/Grid/Columns/Config/Additional.php

+12
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,16 @@ public function getExportTypes()
141141
{
142142
return $this->getGridModel()->getExportTypes();
143143
}
144+
145+
public function getExportAdditionalParams()
146+
{
147+
$params = array();
148+
149+
if (($block = $this->getGridBlock())
150+
&& ($massactionBlock = $block->getMassactionBlock())) {
151+
$params[$massactionBlock->getFormFieldNameInternal()] = $massactionBlock->getSelectedJson();
152+
}
153+
154+
return $params;
155+
}
144156
}

app/design/adminhtml/default/default/template/bl/customgrid/widget/grid/columns/config/additional.phtml

+5
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@
251251
<input type="text" class="blcg-pagination-input" name="export[from_result]" value="<?php echo (($this->getGridPageNumber()-1) * $this->getGridPageSize() +1) ?>" id="<?php echo $this->getHtmlId() ?>-additional-export-from-result">
252252
</li>
253253
</ul>
254+
<div class="no-display">
255+
<?php foreach ($this->getExportAdditionalParams() as $_name => $_value): ?>
256+
<input type="hidden" name="<?php echo $this->htmlEscape($_name) ?>" value="<?php echo $this->htmlEscape($_value) ?>" />
257+
<?php endforeach ?>
258+
</div>
254259
<div class="blcg-custom-grid-config-additional-part-actions">
255260
<?php echo $this->getExportActionButtonHtml() ?>
256261
</div>

app/design/adminhtml/default/default/template/bl/customgrid/widget/grid/form/renderer/fieldset.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<div class="hor-scroll">
5656
<?php endif ?>
5757
<?php if ($_element->getComment()): ?>
58-
<p class="comment"><?php echo $this->escapeHtml($_element->getComment()) ?></p>
58+
<p class="comment"><?php echo $this->htmlEscape($_element->getComment()) ?></p>
5959
<?php endif; ?>
6060
<?php if ($_element->hasHtmlContent()): ?>
6161
<?php echo $_element->getHtmlContent(); ?>

js/bl/customgrid/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ blcg.Grid.Export.prototype = {
11701170
}
11711171
return false;
11721172
}
1173-
return blcg.Tools.submitContainerValues(this.container, $F(this.formatSelect), this.additional, 'GET');
1173+
return blcg.Tools.submitContainerValues(this.container, $F(this.formatSelect), this.additional, 'POST');
11741174
}
11751175
};
11761176

0 commit comments

Comments
 (0)