Fixed bug from relation controller customization improvements PR

This commit is contained in:
Luke Towers 2020-04-04 21:24:53 -06:00
parent b8a6571c1c
commit c2544d40b4
1 changed files with 4 additions and 4 deletions

View File

@ -1499,12 +1499,12 @@ class RelationController extends ControllerBehavior
case 'morphToMany':
case 'morphedByMany':
case 'belongsToMany':
return ['create', 'add', 'delete', 'remove'];
$buttons = ['create', 'add', 'delete', 'remove'];
case 'hasOne':
case 'morphOne':
case 'belongsTo':
return ['create', 'update', 'link', 'delete', 'unlink'];
$buttons = ['create', 'update', 'link', 'delete', 'unlink'];
}
}
}
@ -1541,7 +1541,7 @@ class RelationController extends ControllerBehavior
case 'link':
$text = 'backend::lang.relation.link_name';
break;
case 'unlink':
$text = 'backend::lang.relation.unlink';
break;
@ -1618,7 +1618,7 @@ class RelationController extends ControllerBehavior
} elseif ($this->manageId) {
return 'backend::lang.relation.update_name';
}
return 'backend::lang.relation.create_name';
}
}