1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00

Fix issue processwire/processwire-issues#491 add support for automatically cloning fieldset _END field when fieldset is cloned

This commit is contained in:
Ryan Cramer
2018-02-12 09:20:38 -05:00
parent ef6a9d56e4
commit e73ec872da

View File

@@ -1656,6 +1656,8 @@ class ProcessField extends Process implements ConfigurableModule {
$this->fields->save($clone);
$this->message($this->_('Cloned Field') . " - {$this->field->name} => {$clone->name}");
if(!count($errors)) {
if($clone->type instanceof FieldtypeFieldsetOpen) $clone->set('closeFieldID', null);
$this->fieldAdded($clone);
$this->wire('session')->message($this->_('You are now editing the field you cloned.'));
$this->wire('session')->redirect("./edit?id=$clone->id#basics");
}