1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-26 16:14:35 +02:00

Fix issue processwire/processwire-issues#97 where using {images.count} in repeater label caused issue with loading images in the repeater

This commit is contained in:
Ryan Cramer
2016-12-01 11:22:40 -05:00
parent ef42513831
commit cbdf8e9063

View File

@@ -108,6 +108,17 @@ class InputfieldRepeater extends Inputfield implements InputfieldItemList {
* *
*/ */
public function ___renderRepeaterLabel($label, $cnt, Page $page) { public function ___renderRepeaterLabel($label, $cnt, Page $page) {
static $allowRender = null;
if(is_null($allowRender)) {
$allowRender = true;
if($this->wire('input')->get('repeater_edit')) {
$allowRender = false;
} else if(count($_POST) && !$this->wire('config')->ajax) {
$allowRender = false;
}
}
if(!$allowRender) return $label;
$out = ''; $out = '';
$repeaterTitle = $this->field ? $this->field->get('repeaterTitle') : ''; $repeaterTitle = $this->field ? $this->field->get('repeaterTitle') : '';