diff --git a/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php b/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php index 6ec896bb..128a3432 100644 --- a/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php +++ b/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php @@ -105,6 +105,23 @@ public function form(array $form, FormStateInterface $form_state) { return $form; } + /** + * {@inheritdoc} + */ + protected function actions(array $form, FormStateInterface $form_state) { + $actions = parent::actions($form, $form_state); + // Hide the Delete button. + $actions['delete']['#access'] = FALSE; + // Cancel button to redirect the user to team app listing page. + $actions['cancel'] = [ + '#type' => 'link', + '#title' => $this->t('Cancel'), + '#attributes' => ['class' => ['btn btn-outline-primary']], + '#url' => $this->entity->toUrl('collection-by-team'), + ]; + return $actions; + } + /** * {@inheritdoc} */