From 0047d52ef4087dac74888398d59b26c7dee2089f Mon Sep 17 00:00:00 2001 From: Jari Bakken Date: Wed, 3 Dec 2014 14:19:28 +0100 Subject: [PATCH] Ensure unique ids in feature form. Closes #57. --- public/js/components/feature/FeatureForm.jsx | 14 ++++++++------ public/js/components/form/TextInput.jsx | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/js/components/feature/FeatureForm.jsx b/public/js/components/feature/FeatureForm.jsx index 70915fd20d..17998506d4 100644 --- a/public/js/components/feature/FeatureForm.jsx +++ b/public/js/components/feature/FeatureForm.jsx @@ -59,6 +59,8 @@ var FeatureForm = React.createClass({ enabled: false }; + var idPrefix = this.props.feature ? this.props.feature.name : 'new'; + return (
@@ -67,7 +69,7 @@ var FeatureForm = React.createClass({ {this.props.feature ? "" : Create new toggle}
- +
- {this.renderStrategyOptions()}
@@ -96,8 +98,8 @@ var FeatureForm = React.createClass({
  • - - + +
diff --git a/public/js/components/form/TextInput.jsx b/public/js/components/form/TextInput.jsx index 687774510f..53dc57468b 100644 --- a/public/js/components/form/TextInput.jsx +++ b/public/js/components/form/TextInput.jsx @@ -28,7 +28,7 @@ var TextInput = React.createClass({ render: function() { return (
- +