Skip to content

Commit

Permalink
Added Cancel button on Teamapp edit page:3x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Jul 17, 2023
1 parent cec8c3d commit 1dacdb3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down

0 comments on commit 1dacdb3

Please sign in to comment.