-
@@ -49,11 +56,31 @@ class AreYouSure extends React.Component {
);
}
- onYes() {
- this.closeModal();
+ renderPassword() {
+ return (
+
+ );
+ }
- if (this.props.onYes) {
- this.props.onYes();
+ onPasswordChange(event) {
+ this.setState({
+ password: event.target.value
+ });
+ }
+
+ onInputKeyDown(event) {
+ if (event.keyCode == 13) {
+ this.onYes();
+ }
+ }
+
+ onYes() {
+ if (this.state.password){
+ this.closeModal();
+
+ if (this.props.onYes) {
+ this.props.onYes();
+ }
}
}
diff --git a/client/src/app-components/are-you-sure.scss b/client/src/app-components/are-you-sure.scss
index 04f4c40e..9bb1964a 100644
--- a/client/src/app-components/are-you-sure.scss
+++ b/client/src/app-components/are-you-sure.scss
@@ -27,4 +27,10 @@
display: inline-block;
margin-right: 10px;
}
+
+ &__password {
+ margin: 0 auto;
+ margin-top: -30px;
+ margin-bottom: 20px;
+ }
}
\ No newline at end of file
diff --git a/client/src/app/admin/panel/settings/admin-panel-advanced-settings.js b/client/src/app/admin/panel/settings/admin-panel-advanced-settings.js
index 63b9e522..08867d35 100644
--- a/client/src/app/admin/panel/settings/admin-panel-advanced-settings.js
+++ b/client/src/app/admin/panel/settings/admin-panel-advanced-settings.js
@@ -4,6 +4,7 @@ import {connect} from 'react-redux';
import ConfigActions from 'actions/config-actions';
import i18n from 'lib-app/i18n';
import ToggleButton from 'app-components/toggle-button';
+import AreYouSure from 'app-components/are-you-sure';
import Button from 'core-components/button';
import FileUploader from 'core-components/file-uploader';
@@ -27,13 +28,13 @@ class AdminPanelAdvancedSettings extends React.Component {
{i18n('USER_SYSTEM_ENABLED')}
-
+
{i18n('REGISTRATION')}
-
+
@@ -66,6 +67,10 @@ class AdminPanelAdvancedSettings extends React.Component {
);
}
+ onToggleButtonChange() {
+ AreYouSure.openModal(