From f3b30477ce4307775ba48744b54af72989d2cff9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 16 Sep 2015 16:10:39 +0100 Subject: [PATCH] Backport: add other presets into room presets --- src/controllers/atoms/create_room/Presets.js | 23 ++++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/controllers/atoms/create_room/Presets.js b/src/controllers/atoms/create_room/Presets.js index 5ff7327e5a..bcc2f51481 100644 --- a/src/controllers/atoms/create_room/Presets.js +++ b/src/controllers/atoms/create_room/Presets.js @@ -18,24 +18,23 @@ limitations under the License. var React = require('react'); +var Presets = { + PrivateChat: "private_chat", + PublicChat: "public_chat", + Custom: "custom", +}; + module.exports = { propTypes: { - default_preset: React.PropTypes.string + onChange: React.PropTypes.func, + preset: React.PropTypes.string }, + Presets: Presets, + getDefaultProps: function() { return { - default_preset: 'private_chat', + onChange: function() {}, }; }, - - getInitialState: function() { - return { - preset: this.props.default_preset, - } - }, - - getPreset: function() { - return this.state.preset; - }, };