From 5b41e368ac21f1c8ce24d1131a9cf9e1a454a1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 28 Sep 2015 12:00:13 +0200 Subject: [PATCH] Implement AclProxy for hash work in account settings --- .../ascribe_settings/account_settings.js | 74 ++++++------------- .../ascribe_settings/settings_container.js | 5 +- 2 files changed, 28 insertions(+), 51 deletions(-) diff --git a/js/components/ascribe_settings/account_settings.js b/js/components/ascribe_settings/account_settings.js index 28eca49f..1898c599 100644 --- a/js/components/ascribe_settings/account_settings.js +++ b/js/components/ascribe_settings/account_settings.js @@ -10,6 +10,8 @@ import Property from '../ascribe_forms/property'; import InputCheckbox from '../ascribe_forms/input_checkbox'; import CollapsibleParagraph from '../ascribe_collapsible/collapsible_paragraph'; +import AclProxy from '../acl_proxy'; + import CopyrightAssociationForm from '../ascribe_forms/form_copyright_association'; import ApiUrls from '../../constants/api_urls'; @@ -20,7 +22,8 @@ import { getLangText } from '../../utils/lang_utils'; let AccountSettings = React.createClass({ propTypes: { currentUser: React.PropTypes.object.isRequired, - loadUser: React.PropTypes.func.isRequired + loadUser: React.PropTypes.func.isRequired, + whitelabel: React.PropTypes.object.isRequired }, handleSuccess(){ @@ -66,37 +69,26 @@ let AccountSettings = React.createClass({ ); profile = ( -
- - - - {' ' + getLangText('Enable hash option, e.g. slow connections or to keep piece private')} - - - -
- {/* - - */} -
+ +
+ + + + {' ' + getLangText('Enable hash option, e.g. slow connections or to keep piece private')} + + + +
+
); } return ( @@ -106,24 +98,6 @@ let AccountSettings = React.createClass({ {content} {profile} - {/*
- - - -
-
*/} ); } diff --git a/js/components/ascribe_settings/settings_container.js b/js/components/ascribe_settings/settings_container.js index 0957bb78..2b9ae2a1 100644 --- a/js/components/ascribe_settings/settings_container.js +++ b/js/components/ascribe_settings/settings_container.js @@ -59,7 +59,10 @@ let SettingsContainer = React.createClass({ if (this.state.currentUser && this.state.currentUser.username) { return (
- + {this.props.children}