Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions Classes/Controller/UserBackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ public function userLogoutAction(User $user): ResponseInterface
}

UserUtility::removeFrontendSessionToUser($user);
$this->addFlashMessage('User successfully logged out');
$this->addFlashMessage(
LocalizationUtility::translate(
'BackendConfirmationFlashMessageLogout',
'femanager',
[$user->getUsername()]
)
);
return $this->redirect('list');
}

Expand All @@ -166,8 +172,7 @@ public function confirmUserAction(int $userIdentifier): ResponseInterface
'BackendConfirmationFlashMessageConfirmed',
'femanager',
[$user->getUsername()]
),
'User Confirmation'
)
);
} else {
$this->addFlashMessage(
Expand All @@ -176,7 +181,7 @@ public function confirmUserAction(int $userIdentifier): ResponseInterface
'femanager',
[$user->getUsername()]
),
'User Confirmation',
'',
ContextualFeedbackSeverity::ERROR
);
}
Expand Down Expand Up @@ -220,7 +225,7 @@ public function refuseUserAction(int $userIdentifier): ResponseInterface
'femanager',
[$user->getUsername()]
),
'User Confirmation',
'',
ContextualFeedbackSeverity::ERROR
);
}
Expand Down Expand Up @@ -283,11 +288,8 @@ public function getConfigPID(): int
}

$this->addFlashMessage(
LocalizationUtility::translate(
'BackendMissingConfigPID',
'femanager'
),
'Backend Configuration',
LocalizationUtility::translate('BackendMissingConfigPID'),
'',
ContextualFeedbackSeverity::ERROR
);

Expand Down Expand Up @@ -332,11 +334,8 @@ public function getFrontendRequestResult(string $status, int $userIdentifier, Us
$content = $response->getReasonPhrase();
$GLOBALS['BE_USER']->writelog(4, 0, 1, 0, 'femanager: Frontend request failed.', $content);
$this->addFlashMessage(
LocalizationUtility::translate(
'BackendConfirmationFlashMessageFailed',
'femanager'
),
'User Confirmation',
LocalizationUtility::translate('BackendConfirmationFlashMessageFailed'),
'',
ContextualFeedbackSeverity::ERROR
);
} else {
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@
<trans-unit id="BackendConfirmationColumnUid">
<source>UID</source>
</trans-unit>
<trans-unit id="BackendConfirmationFlashMessageLogout">
<source>%s was successfully logged out</source>
</trans-unit>
<trans-unit id="BackendConfirmationFlashMessageConfirmed">
<source>%s was successfully approved</source>
</trans-unit>
Expand Down
8 changes: 1 addition & 7 deletions Resources/Private/Layouts/Backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@
</div>
</div>
<div class="module-body femanager-backend">
<f:flashMessages as="flashMessages">
<div class="alert alert-warning">
<f:for each="{flashMessages}" as="flashMessage">
<div class="message-body">{flashMessage.message}</div>
</f:for>
</div>
</f:flashMessages>
<f:flashMessages />

<f:render section="main" />
</div>
Expand Down
Loading