Ivan - Update some texts [skip ci]
This commit is contained in:
parent
cf7dbffbf3
commit
796571c8a1
|
@ -41,7 +41,7 @@ class AreYouSure extends React.Component {
|
||||||
{i18n('ARE_YOU_SURE')}
|
{i18n('ARE_YOU_SURE')}
|
||||||
</div>
|
</div>
|
||||||
<div className="are-you-sure__description" id="are-you-sure__description">
|
<div className="are-you-sure__description" id="are-you-sure__description">
|
||||||
{this.props.description}
|
{this.props.description || (this.props.type === 'secure' && i18n('PLEASE_CONFIRM_PASSWORD'))}
|
||||||
</div>
|
</div>
|
||||||
{(this.props.type === 'secure') ? this.renderPassword() : null}
|
{(this.props.type === 'secure') ? this.renderPassword() : null}
|
||||||
<div className="are-you-sure__buttons">
|
<div className="are-you-sure__buttons">
|
||||||
|
|
|
@ -39,13 +39,13 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
<div className="col-md-12">
|
<div className="col-md-12">
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<div className="admin-panel-system-settings__user-system-enabled">
|
<div className="admin-panel-system-settings__user-system-enabled">
|
||||||
<span className="admin-panel-system-settings__text">{i18n('USER_SYSTEM_ENABLED')}</span>
|
<span className="admin-panel-system-settings__text">{i18n('ENABLE_USER_SYSTEM')}</span>
|
||||||
<ToggleButton className="admin-panel-system-settings__toggle-button" value={this.props.config['user-system-enabled']} onChange={this.onToggleButtonUserSystemChange.bind(this)}/>
|
<ToggleButton className="admin-panel-system-settings__toggle-button" value={this.props.config['user-system-enabled']} onChange={this.onToggleButtonUserSystemChange.bind(this)}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<div className="admin-panel-system-settings__registration">
|
<div className="admin-panel-system-settings__registration">
|
||||||
<span className="admin-panel-system-settings__text">{i18n('REGISTRATION')}</span>
|
<span className="admin-panel-system-settings__text">{i18n('ENABLE_USER_REGISTRATION')}</span>
|
||||||
<ToggleButton className="admin-panel-system-settings__toggle-button" value={this.props.config['registration']} onChange={this.onToggleButtonRegistrationChange.bind(this)}/>
|
<ToggleButton className="admin-panel-system-settings__toggle-button" value={this.props.config['registration']} onChange={this.onToggleButtonRegistrationChange.bind(this)}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -127,11 +127,11 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onToggleButtonUserSystemChange() {
|
onToggleButtonUserSystemChange() {
|
||||||
AreYouSure.openModal(<div>{i18n('PLEASE_CONFIRM_PASSWORD')}</div>, this.onAreYouSureUserSystemOk.bind(this), 'secure');
|
AreYouSure.openModal(null, this.onAreYouSureUserSystemOk.bind(this), 'secure');
|
||||||
}
|
}
|
||||||
|
|
||||||
onToggleButtonRegistrationChange() {
|
onToggleButtonRegistrationChange() {
|
||||||
AreYouSure.openModal(<div>{i18n('PLEASE_CONFIRM_PASSWORD')}</div>, this.onAreYouSureRegistrationOk.bind(this), 'secure');
|
AreYouSure.openModal(null, this.onAreYouSureRegistrationOk.bind(this), 'secure');
|
||||||
}
|
}
|
||||||
|
|
||||||
onAreYouSureUserSystemOk(password) {
|
onAreYouSureUserSystemOk(password) {
|
||||||
|
@ -143,10 +143,10 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
messageType: 'success',
|
messageType: 'success',
|
||||||
messageContent: this.props.config['user-system-enabled'] ? i18n('USER_SYSTEM_DISABLE_DESCRIPTION') : i18n('USER_SYSTEM_ENABLE_DESCRIPTION')
|
messageContent: this.props.config['user-system-enabled'] ? i18n('USER_SYSTEM_DISABLED') : i18n('USER_SYSTEM_ENABLED')
|
||||||
});
|
});
|
||||||
this.props.dispatch(ConfigActions.updateData());
|
this.props.dispatch(ConfigActions.updateData());
|
||||||
}).catch(() => this.setState({messageType: 'fail', messageContent: i18n('ERROR_UPDATING_SETTINGS')}));
|
}).catch(() => this.setState({messageType: 'error', messageContent: i18n('ERROR_UPDATING_SETTINGS')}));
|
||||||
}
|
}
|
||||||
|
|
||||||
onAreYouSureRegistrationOk(password) {
|
onAreYouSureRegistrationOk(password) {
|
||||||
|
@ -158,18 +158,18 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
messageType: 'success',
|
messageType: 'success',
|
||||||
messageContent: this.props.config['user-system-enabled'] ? i18n('REGISTRATION_DISABLE_DESCRIPTION') : i18n('REGISTRATION_ENABLE_DESCRIPTION')
|
messageContent: this.props.config['registration'] ? i18n('REGISTRATION_DISABLED') : i18n('REGISTRATION_ENABLED')
|
||||||
});
|
});
|
||||||
this.props.dispatch(ConfigActions.updateData());
|
this.props.dispatch(ConfigActions.updateData());
|
||||||
}).catch(() => this.setState({messageType: 'fail', messageContent: i18n('ERROR_UPDATING_SETTINGS')}));
|
}).catch(() => this.setState({messageType: 'error', messageContent: i18n('ERROR_UPDATING_SETTINGS')}));
|
||||||
}
|
}
|
||||||
|
|
||||||
onImportCSV(event) {
|
onImportCSV(event) {
|
||||||
AreYouSure.openModal(<div>{i18n('PLEASE_CONFIRM_PASSWORD')}</div>, this.onAreYouSureCSVOk.bind(this, event.target.value), 'secure');
|
AreYouSure.openModal(null, this.onAreYouSureCSVOk.bind(this, event.target.value), 'secure');
|
||||||
}
|
}
|
||||||
|
|
||||||
onImportSQL(event) {
|
onImportSQL(event) {
|
||||||
AreYouSure.openModal(<div>{i18n('PLEASE_CONFIRM_PASSWORD')}</div>, this.onAreYouSureSQLOk.bind(this, event.target.value), 'secure');
|
AreYouSure.openModal(null, this.onAreYouSureSQLOk.bind(this, event.target.value), 'secure');
|
||||||
}
|
}
|
||||||
|
|
||||||
onAreYouSureCSVOk(file, password) {
|
onAreYouSureCSVOk(file, password) {
|
||||||
|
@ -180,7 +180,7 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
password: password
|
password: password
|
||||||
}
|
}
|
||||||
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_IMPORTING_CSV_DESCRIPTION')}
|
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_IMPORTING_CSV_DESCRIPTION')}
|
||||||
)).catch(() => this.setState({messageType: 'fail', messageContent: i18n('ERROR_IMPORTING_CSV_DESCRIPTION')}));
|
)).catch(() => this.setState({messageType: 'error', messageContent: i18n('ERROR_IMPORTING_CSV_DESCRIPTION')}));
|
||||||
}
|
}
|
||||||
|
|
||||||
onAreYouSureSQLOk(file, password) {
|
onAreYouSureSQLOk(file, password) {
|
||||||
|
@ -191,7 +191,7 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
password: password
|
password: password
|
||||||
}
|
}
|
||||||
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_IMPORTING_SQL_DESCRIPTION')}
|
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_IMPORTING_SQL_DESCRIPTION')}
|
||||||
)).catch(() => this.setState({messageType: 'fail', messageContent: i18n('ERROR_IMPORTING_SQL_DESCRIPTION')}));
|
)).catch(() => this.setState({messageType: 'error', messageContent: i18n('ERROR_IMPORTING_SQL_DESCRIPTION')}));
|
||||||
}
|
}
|
||||||
|
|
||||||
onBackupDatabase() {
|
onBackupDatabase() {
|
||||||
|
@ -210,7 +210,7 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onDeleteAllUsers() {
|
onDeleteAllUsers() {
|
||||||
AreYouSure.openModal(<div>{i18n('PLEASE_CONFIRM_PASSWORD')}</div>, this.onAreYouSureDeleteAllUsersOk.bind(this), 'secure');
|
AreYouSure.openModal(null, this.onAreYouSureDeleteAllUsersOk.bind(this), 'secure');
|
||||||
}
|
}
|
||||||
|
|
||||||
onAreYouSureDeleteAllUsersOk(password) {
|
onAreYouSureDeleteAllUsersOk(password) {
|
||||||
|
@ -220,7 +220,7 @@ class AdminPanelAdvancedSettings extends React.Component {
|
||||||
password: password
|
password: password
|
||||||
}
|
}
|
||||||
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_DELETING_ALL_USERS')}
|
}).then(() => this.setState({messageType: 'success', messageContent: i18n('SUCCESS_DELETING_ALL_USERS')}
|
||||||
)).catch(() => this.setState({messageType: 'fail', messageContent: i18n('ERROR_DELETING_ALL_USERS')}));
|
)).catch(() => this.setState({messageType: 'error', messageContent: i18n('ERROR_DELETING_ALL_USERS')}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,26 @@ module.exports = [
|
||||||
return 'text content';
|
return 'text content';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/system/import-csv',
|
||||||
|
time: 100,
|
||||||
|
response: function () {
|
||||||
|
return {
|
||||||
|
status: 'success',
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/system/import-sql',
|
||||||
|
time: 100,
|
||||||
|
response: function () {
|
||||||
|
return {
|
||||||
|
status: 'success',
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/system/get-mail-templates',
|
path: '/system/get-mail-templates',
|
||||||
time: 100,
|
time: 100,
|
||||||
|
|
|
@ -152,8 +152,8 @@ export default {
|
||||||
'ALL_NOTIFICATIONS': 'All notifications',
|
'ALL_NOTIFICATIONS': 'All notifications',
|
||||||
'VERIFY_SUCCESS': 'User verified',
|
'VERIFY_SUCCESS': 'User verified',
|
||||||
'VERIFY_FAILED': 'Could not verify',
|
'VERIFY_FAILED': 'Could not verify',
|
||||||
'USER_SYSTEM_ENABLED': 'Use user system for customers',
|
'ENABLE_USER_SYSTEM': 'Use user system for customers',
|
||||||
'REGISTRATION': 'Enable user registration',
|
'ENABLE_USER_REGISTRATION': 'Enable user registration',
|
||||||
'INCLUDE_USERS_VIA_CSV': 'Include users via CSV file',
|
'INCLUDE_USERS_VIA_CSV': 'Include users via CSV file',
|
||||||
'INCLUDE_DATABASE_VIA_SQL': 'Include database via SQL file',
|
'INCLUDE_DATABASE_VIA_SQL': 'Include database via SQL file',
|
||||||
'BACKUP_DATABASE': 'Backup database',
|
'BACKUP_DATABASE': 'Backup database',
|
||||||
|
@ -223,7 +223,11 @@ export default {
|
||||||
'SYSTEM_PREFERENCES_DESCRIPTION': 'Here you can edit the preferences of the system.',
|
'SYSTEM_PREFERENCES_DESCRIPTION': 'Here you can edit the preferences of the system.',
|
||||||
'VERIFY_SUCCESS_DESCRIPTION': 'You user has been verified correctly. You can log in now.',
|
'VERIFY_SUCCESS_DESCRIPTION': 'You user has been verified correctly. You can log in now.',
|
||||||
'VERIFY_FAILED_DESCRIPTION': 'The verification could not be done.',
|
'VERIFY_FAILED_DESCRIPTION': 'The verification could not be done.',
|
||||||
'ADVANCED_SETTINGS_DESCRIPTION': 'Advanced settings description should go here!',
|
'ADVANCED_SETTINGS_DESCRIPTION': 'Here you can change the advanced settings of your system. Please be careful, the changes you make can not be reversed.',
|
||||||
|
'USER_SYSTEM_DISABLED': 'User system has been disabled',
|
||||||
|
'USER_SYSTEM_ENABLED': 'User system has been enabled',
|
||||||
|
'REGISTRATION_DISABLED': 'Registration has been disabled',
|
||||||
|
'REGISTRATION_ENABLED': 'Registration has been enabled',
|
||||||
|
|
||||||
//ERRORS
|
//ERRORS
|
||||||
'EMAIL_OR_PASSWORD': 'Email or password invalid',
|
'EMAIL_OR_PASSWORD': 'Email or password invalid',
|
||||||
|
|
Loading…
Reference in New Issue