From 8d2fd204db6de4dae3bed5bc609e874c72f4bb56 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 3 Mar 2016 10:26:50 -0500 Subject: Changed submit button of ManageLanguage to match other settings --- .../components/user_settings/manage_languages.jsx | 36 +++++++++++++--------- .../user_settings/user_settings_display.jsx | 23 +++++--------- 2 files changed, 28 insertions(+), 31 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/user_settings/manage_languages.jsx b/web/react/components/user_settings/manage_languages.jsx index fee6d9da2..2d1c74717 100644 --- a/web/react/components/user_settings/manage_languages.jsx +++ b/web/react/components/user_settings/manage_languages.jsx @@ -1,6 +1,8 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. +import SettingItemMax from '../setting_item_max.jsx'; + import * as Client from '../../utils/client.jsx'; import * as Utils from '../../utils/utils.jsx'; @@ -69,7 +71,7 @@ export default class ManageLanguage extends React.Component { ); }); - return ( + const input = (

); + + return ( + + } + width='medium' + submit={this.changeLanguage} + inputs={[input]} + updateSection={this.props.updateSection} + /> + ); } } ManageLanguage.propTypes = { - user: React.PropTypes.object -}; \ No newline at end of file + user: React.PropTypes.object.isRequired, + updateSection: React.PropTypes.func.isRequired +}; diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx index 5f23a8995..62c469e32 100644 --- a/web/react/components/user_settings/user_settings_display.jsx +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -46,10 +46,6 @@ const holders = defineMessages({ fontTitle: { id: 'user.settings.display.fontTitle', defaultMessage: 'Display Font' - }, - language: { - id: 'user.settings.display.language', - defaultMessage: 'Language' } }); @@ -379,19 +375,9 @@ class UserSettingsDisplay extends React.Component { } if (this.props.activeSection === 'languages') { - var inputs = []; - inputs.push( + languagesSection = ( - ); - - languagesSection = ( - { this.updateSection(''); e.preventDefault(); @@ -408,7 +394,12 @@ class UserSettingsDisplay extends React.Component { languagesSection = ( + } width='medium' describe={locale} updateSection={() => { -- cgit v1.2.3-1-g7c22