aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-03-26 14:09:05 +0200
committerJohan Van Ryseghem2018-04-04 11:10:39 +0200
commita59aa62be66340bb1ac22bad7cb980dbf1a5ffa1 (patch)
treef5b37700a3e9d911f19f507c6865a33a1b9f5c0e
parent6f8bba2239c1717b3224e836eea0f9392fbb5c97 (diff)
downloadchouette-core-a59aa62be66340bb1ac22bad7cb980dbf1a5ffa1.tar.bz2
Refs #6316; String-type CustomFields
-rw-r--r--app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs.js b/app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs.js
index 90d72a801..827c36b76 100644
--- a/app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs.js
+++ b/app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs.js
@@ -27,6 +27,19 @@ export default class CustomFieldsInputs extends Component {
)
}
+ stringInput(cf){
+ return(
+ <input
+ type='text'
+ ref={'custom_fields.' + cf.code}
+ className='form-control'
+ disabled={this.props.disabled}
+ defaultValue={cf.value}
+ onChange={(e) => this.props.onUpdate(cf.code, e.target.value) }
+ />
+ )
+ }
+
render() {
return (
<div>