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:
@@ -109,6 +109,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') : '';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user