Skip to content

Commit

Permalink
Merge pull request #355 from EscolaDeSaudePublica/develop
Browse files Browse the repository at this point in the history
Ajuste no hook de redirecionamento após importar formulário do sagu
  • Loading branch information
jeff-doliveira1 authored Jul 19, 2022
2 parents 673be59 + ff057ef commit 6272042
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,14 @@ function _init() {
$app->hook('template(panel.index.content):before', function() use ($app){
$app->view->enqueueScript('app', 'menu_names', 'js/menu_names.js');
});

/**
* Hook para corrigir redirect para form de importação
*/
$app->hook('entity(Opportunity.importFields:after', function() use($app) {
$entity = $this->controller->requestedEntity;
$app->redirect($entity->editUrl.'#tab=form-config');
$app->hook('entity(Opportunity.importFields:after', function () use ($app) {
$opportunity = $app->repo("Opportunity")->find($this->id);

$app->redirect($opportunity->editUrl . '#tab=form-config');
});

/**
Expand Down

0 comments on commit 6272042

Please sign in to comment.