Fix flash message text and mark them to traslation
This commit is contained in:
parent
e980e4d34f
commit
b8088acfae
6 changed files with 24 additions and 8 deletions
|
|
@ -414,10 +414,11 @@ export class SectionContent extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const t = this.props.t;
|
||||
const queryParams = this.props.location.search;
|
||||
if (queryParams.indexOf('cas-login-success') > -1) this.setFlashMessage('success', 'Successful authentication');
|
||||
if (queryParams.indexOf('cas-logout-success') > -1) this.setFlashMessage('success', 'Successful logout');
|
||||
if (queryParams.indexOf('cas-login-error') > -1) this.setFlashMessage('danger', 'Fail authentication');
|
||||
if (queryParams.indexOf('cas-login-success') > -1) this.setFlashMessage('success', t('authenticationSuccessful'));
|
||||
if (queryParams.indexOf('cas-logout-success') > -1) this.setFlashMessage('success', t('logoutSuccessful'));
|
||||
if (queryParams.indexOf('cas-login-error') > -1) this.setFlashMessage('danger', t('authenticationFailed'));
|
||||
|
||||
window.addEventListener('beforeunload', this.beforeUnloadHandler);
|
||||
this.historyUnblock = this.props.history.block('Changes you made may not be saved. Are you sure you want to leave this page?');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue