mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Minor adjustments to repeater and asmSelect
This commit is contained in:
@@ -553,9 +553,22 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
|
|||||||
$readyPage->save();
|
$readyPage->save();
|
||||||
}
|
}
|
||||||
$readyPage->setQuietly('_repeater_new', 1);
|
$readyPage->setQuietly('_repeater_new', 1);
|
||||||
|
$this->readyPageSaved($readyPage, $page, $field);
|
||||||
return $readyPage;
|
return $readyPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook called when a ready page is saved
|
||||||
|
*
|
||||||
|
* @param Page $readyPage
|
||||||
|
* @param Page $ownerPage
|
||||||
|
* @param Field $field
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected function ___readyPageSaved(Page $readyPage, Page $ownerPage, Field $field) {
|
||||||
|
// for hooks only
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a blank page ready for use as a repeater
|
* Returns a blank page ready for use as a repeater
|
||||||
*
|
*
|
||||||
|
@@ -223,6 +223,7 @@ function InputfieldRepeater($) {
|
|||||||
var $inputfields = $loaded.closest('.Inputfields');
|
var $inputfields = $loaded.closest('.Inputfields');
|
||||||
|
|
||||||
if($repeater.hasClass('InputfieldRenderValueMode')) ajaxURL += '&inrvm=1';
|
if($repeater.hasClass('InputfieldRenderValueMode')) ajaxURL += '&inrvm=1';
|
||||||
|
if($repeater.hasClass('InputfieldNoDraft')) ajaxURL += '&nodraft=1';
|
||||||
|
|
||||||
$spinner.removeClass('fa-arrows').addClass('fa-spin fa-spinner');
|
$spinner.removeClass('fa-arrows').addClass('fa-spin fa-spinner');
|
||||||
repeaterID = repeaterID.replace(/_repeater\d+$/, '');
|
repeaterID = repeaterID.replace(/_repeater\d+$/, '');
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -109,7 +109,7 @@ class InputfieldAsmSelect extends InputfieldSelectMultiple implements Inputfield
|
|||||||
|
|
||||||
public function ___getConfigInputfields() {
|
public function ___getConfigInputfields() {
|
||||||
$inputfields = parent::___getConfigInputfields();
|
$inputfields = parent::___getConfigInputfields();
|
||||||
if($this->hasFieldtype != 'FieldtypePage') return $inputfields;
|
if($this->hasFieldtype != 'FieldtypePage' || !$this->hasField) return $inputfields;
|
||||||
$f = $this->wire('modules')->get('InputfieldRadios');
|
$f = $this->wire('modules')->get('InputfieldRadios');
|
||||||
$f->attr('name', 'usePageEdit');
|
$f->attr('name', 'usePageEdit');
|
||||||
$f->label = $this->_('Link selected pages to page editor?');
|
$f->label = $this->_('Link selected pages to page editor?');
|
||||||
|
Reference in New Issue
Block a user