@@ 56-72 (lines=17) @@ | ||
53 | $form = $this->createForm(RaaInstitutionSelectionType::class, $command); |
|
54 | $form->handleRequest($request); |
|
55 | ||
56 | if ($form->isSubmitted() && $form->isValid()) { |
|
57 | $institutionConfigurationOptions = $this->getInstitutionConfigurationOptionsService() |
|
58 | ->getInstitutionConfigurationOptionsFor($command->institution); |
|
59 | $token->changeInstitutionScope($command->institution, $institutionConfigurationOptions); |
|
60 | ||
61 | $flashMessage = $this->get('translator') |
|
62 | ->trans('ra.sraa.changed_institution', ['%institution%' => $command->institution]); |
|
63 | $this->get('session')->getFlashBag()->add('success', $flashMessage); |
|
64 | ||
65 | $logger->notice(sprintf( |
|
66 | 'RAA "%s" successfully switched to institution "%s"', |
|
67 | $identity->id, |
|
68 | $command->institution |
|
69 | )); |
|
70 | ||
71 | return $this->redirect($this->generateUrl('ra_vetting_search')); |
|
72 | } |
|
73 | ||
74 | $logger->notice(sprintf('Showing select institution form for RAA "%s"', $identity->id)); |
|
75 |
@@ 49-65 (lines=17) @@ | ||
46 | $form = $this->createForm(InstitutionSelectionType::class, $command); |
|
47 | $form->handleRequest($request); |
|
48 | ||
49 | if ($form->isSubmitted() && $form->isValid()) { |
|
50 | $institutionConfigurationOptions = $this->get('ra.service.institution_configuration_options') |
|
51 | ->getInstitutionConfigurationOptionsFor($command->institution); |
|
52 | $token->changeInstitutionScope($command->institution, $institutionConfigurationOptions); |
|
53 | ||
54 | $flashMessage = $this->get('translator') |
|
55 | ->trans('ra.sraa.changed_institution', ['%institution%' => $command->institution]); |
|
56 | $this->get('session')->getFlashBag()->add('success', $flashMessage); |
|
57 | ||
58 | $logger->notice(sprintf( |
|
59 | 'SRAA "%s" successfully switched to institution "%s"', |
|
60 | $identity->id, |
|
61 | $command->institution |
|
62 | )); |
|
63 | ||
64 | return $this->redirect($this->generateUrl('ra_vetting_search')); |
|
65 | } |
|
66 | ||
67 | $logger->notice(sprintf('Showing select institution form for SRAA "%s"', $identity->id)); |
|
68 |