[FIX] Correct message for manual approval user Registration (#1906)
* [FIX] Correct message for manual approval from admin shown on Registeration * lint fix - added semicolon * Updated the translations * [FIX] Translations * i18n to match server Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com> Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
6982d7676a
commit
df0a38566b
|
@ -47,6 +47,9 @@ export default {
|
|||
Accounts_ShowFormLogin: {
|
||||
type: 'valueAsBoolean'
|
||||
},
|
||||
Accounts_ManuallyApproveNewUsers: {
|
||||
type: 'valueAsBoolean'
|
||||
},
|
||||
CROWD_Enable: {
|
||||
type: 'valueAsBoolean'
|
||||
},
|
||||
|
|
|
@ -502,6 +502,7 @@ export default {
|
|||
Uses_server_configuration: 'Uses server configuration',
|
||||
Usually_a_discussion_starts_with_a_question_like_How_do_I_upload_a_picture: 'Usually, a discussion starts with a question, like "How do I upload a picture?"',
|
||||
Validating: 'Validating',
|
||||
Registration_Succeeded: 'Registration Succeeded!',
|
||||
Verify: 'Verify',
|
||||
Verify_email_title: 'Registration Succeeded!',
|
||||
Verify_email_desc: 'We have sent you an email to confirm your registration. If you do not receive an email shortly, please come back and try again.',
|
||||
|
@ -557,5 +558,6 @@ export default {
|
|||
You_will_be_logged_out_of_this_application: 'You will be logged out of this application.',
|
||||
Clear: 'Clear',
|
||||
This_will_clear_all_your_offline_data: 'This will clear all your offline data.',
|
||||
Mark_unread: 'Mark Unread'
|
||||
Mark_unread: 'Mark Unread',
|
||||
Wait_activation_warning: 'Before you can login, your account must be manually activated by an administrator.'
|
||||
};
|
||||
|
|
|
@ -498,5 +498,6 @@ export default {
|
|||
You_will_be_logged_out_of_this_application: 'Você sairá deste aplicativo.',
|
||||
Clear: 'Limpar',
|
||||
This_will_clear_all_your_offline_data: 'Isto limpará todos os seus dados offline.',
|
||||
Mark_unread: 'Marcar como não Lida'
|
||||
Mark_unread: 'Marcar como não Lida',
|
||||
Wait_activation_warning: 'Antes que você possa fazer o login, sua conta deve ser manualmente ativada por um administrador.'
|
||||
};
|
||||
|
|
|
@ -67,6 +67,7 @@ class RegisterView extends React.Component {
|
|||
server: PropTypes.string,
|
||||
Accounts_CustomFields: PropTypes.string,
|
||||
Accounts_EmailVerification: PropTypes.bool,
|
||||
Accounts_ManuallyApproveNewUsers: PropTypes.bool,
|
||||
theme: PropTypes.string,
|
||||
Site_Name: PropTypes.string,
|
||||
loginRequest: PropTypes.func,
|
||||
|
@ -127,7 +128,12 @@ class RegisterView extends React.Component {
|
|||
const {
|
||||
name, email, password, username, customFields
|
||||
} = this.state;
|
||||
const { loginRequest, Accounts_EmailVerification, navigation } = this.props;
|
||||
const {
|
||||
loginRequest,
|
||||
Accounts_EmailVerification,
|
||||
navigation,
|
||||
Accounts_ManuallyApproveNewUsers
|
||||
} = this.props;
|
||||
|
||||
try {
|
||||
await RocketChat.register({
|
||||
|
@ -136,7 +142,10 @@ class RegisterView extends React.Component {
|
|||
|
||||
if (Accounts_EmailVerification) {
|
||||
await navigation.goBack();
|
||||
showErrorAlert(I18n.t('Verify_email_desc'), I18n.t('Verify_email_title'));
|
||||
showErrorAlert(I18n.t('Verify_email_desc'), I18n.t('Registration_Succeeded'));
|
||||
} else if (Accounts_ManuallyApproveNewUsers) {
|
||||
await navigation.goBack();
|
||||
showErrorAlert(I18n.t('Wait_activation_warning'), I18n.t('Registration_Succeeded'));
|
||||
} else {
|
||||
await loginRequest({ user: email, password });
|
||||
}
|
||||
|
@ -325,6 +334,7 @@ const mapStateToProps = state => ({
|
|||
CAS_login_url: state.settings.CAS_login_url,
|
||||
Accounts_CustomFields: state.settings.Accounts_CustomFields,
|
||||
Accounts_EmailVerification: state.settings.Accounts_EmailVerification,
|
||||
Accounts_ManuallyApproveNewUsers: state.settings.Accounts_ManuallyApproveNewUsers,
|
||||
showLoginButton: getShowLoginButton(state)
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue