mirror of
https://github.com/processwire/processwire.git
synced 2025-08-26 08:04:38 +02:00
Fix issue processwire/processwire-issues#807
This commit is contained in:
@@ -316,7 +316,7 @@ class ProcessPageAdd extends Process implements ConfigurableModule, WirePageEdit
|
|||||||
$f->attr('name', 'parent_id');
|
$f->attr('name', 'parent_id');
|
||||||
$f->attr('id', 'select_parent_id');
|
$f->attr('id', 'select_parent_id');
|
||||||
$f->label = sprintf($this->_('Where do you want to add the new %s?'), "\"$templateLabel\"");
|
$f->label = sprintf($this->_('Where do you want to add the new %s?'), "\"$templateLabel\"");
|
||||||
$f->description = sprintf($this->_('Please select a parent %s page below:'), "\"$parentTemplateLabel\"");
|
$f->description = sprintf($this->_('Please select a parent %s page below:'), "\"$parentTemplateLabel\"");
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
foreach($parents as $parent) {
|
foreach($parents as $parent) {
|
||||||
@@ -332,9 +332,16 @@ class ProcessPageAdd extends Process implements ConfigurableModule, WirePageEdit
|
|||||||
}
|
}
|
||||||
|
|
||||||
$form->add($f);
|
$form->add($f);
|
||||||
|
|
||||||
|
$f = $this->wire('modules')->get('InputfieldHidden');
|
||||||
|
$f->attr('name', 'template_id');
|
||||||
|
$f->attr('value', $template->id);
|
||||||
|
$form->add($f);
|
||||||
|
|
||||||
$f = $this->wire('modules')->get('InputfieldSubmit');
|
$f = $this->wire('modules')->get('InputfieldSubmit');
|
||||||
$f->attr('id', 'select_parent_submit');
|
$f->attr('id', 'select_parent_submit');
|
||||||
$form->add($f);
|
$form->add($f);
|
||||||
|
|
||||||
return $form->render();
|
return $form->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user