Max Red - Added toggle buttons [skip ci]
This commit is contained in:
parent
bcb9b5b7ac
commit
e32717a1a6
|
@ -1,14 +1,54 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import ConfigActions from 'actions/config-actions';
|
||||
import i18n from 'lib-app/i18n';
|
||||
import API from 'lib-app/api-call';
|
||||
import ToggleButton from 'app-components/toggle-button';
|
||||
|
||||
import Header from 'core-components/header';
|
||||
|
||||
class AdminPanelAdvancedSettings extends React.Component {
|
||||
|
||||
state = {
|
||||
loading: true,
|
||||
values: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
/admin/panel/settings/advanced-settings
|
||||
<div className="admin-panel-system-settings">
|
||||
<Header title={i18n('ADVANCED_SETTINGS')} description={i18n('ADVANCED_SETTINGS_DESCRIPTION')}/>
|
||||
<div className="row">
|
||||
<div className="col-md-12">
|
||||
<div className="col-md-6">
|
||||
<div className="admin-panel-system-settings__user-system-enabled">
|
||||
<ToggleButton className="admin-panel-system-settings__user-system-enabled-toggle-button" value={this.props.config['user-system-enabled']}/>
|
||||
<span>{i18n('USER_SYSTEM_ENABLED')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<div className="admin-panel-system-settings__registration">
|
||||
<ToggleButton className="admin-panel-system-settings__user-system-enabled-toggle-button" value={this.props.config['registration']}/>
|
||||
<span>{i18n('REGISTRATION')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<span className="separator" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default AdminPanelAdvancedSettings;
|
||||
|
||||
export default connect((store) => {
|
||||
return {
|
||||
config: store.config
|
||||
};
|
||||
})(AdminPanelAdvancedSettings);
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.admin-panel-system-settings {
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
module.exports = [
|
||||
{
|
||||
path: '/system/get-settings',
|
||||
time: 1000,
|
||||
time: 850,
|
||||
response: function (params) {
|
||||
if(params && params.allSettings) {
|
||||
return {
|
||||
|
@ -27,7 +27,9 @@ module.exports = [
|
|||
{id: 3, name: 'System and Administration', owners: 0}
|
||||
],
|
||||
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
|
||||
'supportedLanguages': ['en', 'es', 'de']
|
||||
'supportedLanguages': ['en', 'es', 'de'],
|
||||
'registration': true,
|
||||
'user-system-enabled': true
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -44,7 +46,9 @@ module.exports = [
|
|||
{id: 3, name: 'System and Administration', owners: 0}
|
||||
],
|
||||
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
|
||||
'supportedLanguages': ['en', 'es', 'de']
|
||||
'supportedLanguages': ['en', 'es', 'de'],
|
||||
'registration': true,
|
||||
'user-system-enabled': true
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -152,6 +152,8 @@ export default {
|
|||
'ALL_NOTIFICATIONS': 'All notifications',
|
||||
'VERIFY_SUCCESS': 'User verified',
|
||||
'VERIFY_FAILED': 'Could not verify',
|
||||
'USER_SYSTEM_ENABLED': 'Use user system for customers',
|
||||
'REGISTRATION': 'Enable user registration',
|
||||
|
||||
//ACTIVITIES
|
||||
'ACTIVITY_COMMENT': 'commented ticket',
|
||||
|
@ -213,6 +215,7 @@ export default {
|
|||
'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_FAILED_DESCRIPTION': 'The verification could not be done.',
|
||||
'ADVANCED_SETTINGS_DESCRIPTION': 'Advanced settings description should go here!',
|
||||
|
||||
//ERRORS
|
||||
'EMAIL_OR_PASSWORD': 'Email or password invalid',
|
||||
|
|
Loading…
Reference in New Issue