mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
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 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 {
|
class AdminPanelAdvancedSettings extends React.Component {
|
||||||
|
|
||||||
|
state = {
|
||||||
|
loading: true,
|
||||||
|
values: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="admin-panel-system-settings">
|
||||||
/admin/panel/settings/advanced-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>
|
</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 = [
|
module.exports = [
|
||||||
{
|
{
|
||||||
path: '/system/get-settings',
|
path: '/system/get-settings',
|
||||||
time: 1000,
|
time: 850,
|
||||||
response: function (params) {
|
response: function (params) {
|
||||||
if(params && params.allSettings) {
|
if(params && params.allSettings) {
|
||||||
return {
|
return {
|
||||||
@ -27,7 +27,9 @@ module.exports = [
|
|||||||
{id: 3, name: 'System and Administration', owners: 0}
|
{id: 3, name: 'System and Administration', owners: 0}
|
||||||
],
|
],
|
||||||
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
|
'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}
|
{id: 3, name: 'System and Administration', owners: 0}
|
||||||
],
|
],
|
||||||
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
|
'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',
|
'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',
|
||||||
|
'REGISTRATION': 'Enable user registration',
|
||||||
|
|
||||||
//ACTIVITIES
|
//ACTIVITIES
|
||||||
'ACTIVITY_COMMENT': 'commented ticket',
|
'ACTIVITY_COMMENT': 'commented ticket',
|
||||||
@ -213,6 +215,7 @@ 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!',
|
||||||
|
|
||||||
//ERRORS
|
//ERRORS
|
||||||
'EMAIL_OR_PASSWORD': 'Email or password invalid',
|
'EMAIL_OR_PASSWORD': 'Email or password invalid',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user