1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +02:00

Minor adjustments to repeater and asmSelect

This commit is contained in:
Ryan Cramer
2017-04-28 14:54:26 -04:00
parent 7adf09e305
commit 347240acd9
4 changed files with 16 additions and 2 deletions

View File

@@ -553,9 +553,22 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
$readyPage->save();
}
$readyPage->setQuietly('_repeater_new', 1);
$this->readyPageSaved($readyPage, $page, $field);
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
*

View File

@@ -223,6 +223,7 @@ function InputfieldRepeater($) {
var $inputfields = $loaded.closest('.Inputfields');
if($repeater.hasClass('InputfieldRenderValueMode')) ajaxURL += '&inrvm=1';
if($repeater.hasClass('InputfieldNoDraft')) ajaxURL += '&nodraft=1';
$spinner.removeClass('fa-arrows').addClass('fa-spin fa-spinner');
repeaterID = repeaterID.replace(/_repeater\d+$/, '');

File diff suppressed because one or more lines are too long

View File

@@ -109,7 +109,7 @@ class InputfieldAsmSelect extends InputfieldSelectMultiple implements Inputfield
public function ___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->attr('name', 'usePageEdit');
$f->label = $this->_('Link selected pages to page editor?');