diff options
| author | cedricnjanga | 2018-03-15 12:41:29 -0700 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-03-29 11:28:28 +0200 |
| commit | 1019debe93d776f0d38ae69099e6492a7dd4a87c (patch) | |
| tree | 16903e673284d4d378f6794a58e7ed6ff4c9da40 /app/javascript/routes/components/StopPoint.js | |
| parent | 23318bbe07b73cef50ec69d5e597386a116e2b82 (diff) | |
| download | chouette-core-1019debe93d776f0d38ae69099e6492a7dd4a87c.tar.bz2 | |
Refs #6075 Change default attributes for stop areas
Diffstat (limited to 'app/javascript/routes/components/StopPoint.js')
| -rw-r--r-- | app/javascript/routes/components/StopPoint.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/javascript/routes/components/StopPoint.js b/app/javascript/routes/components/StopPoint.js index af51a6bb4..368ec8261 100644 --- a/app/javascript/routes/components/StopPoint.js +++ b/app/javascript/routes/components/StopPoint.js @@ -4,6 +4,8 @@ import PropTypes from 'prop-types' import BSelect2 from './BSelect2' import OlMap from './OlMap' +import { defaultAttribute } from '../actions' + export default function StopPoint(props, {I18n}) { return ( <div className='nested-fields'> @@ -17,14 +19,14 @@ export default function StopPoint(props, {I18n}) { </div> <div> - <select className='form-control' value={props.value.for_boarding} id="for_boarding" onChange={props.onSelectChange}> + <select className='form-control' value={defaultAttribute(props.value.for_boarding, props.value.stoparea_kind)} id="for_boarding" onChange={props.onSelectChange}> <option value="normal">{I18n.t('routes.edit.stop_point.boarding.normal')}</option> <option value="forbidden">{I18n.t('routes.edit.stop_point.boarding.forbidden')}</option> </select> </div> <div> - <select className='form-control' value={props.value.for_alighting} id="for_alighting" onChange={props.onSelectChange}> + <select className='form-control' value={defaultAttribute(props.value.for_alighting, props.value.stoparea_kind)} id="for_alighting" onChange={props.onSelectChange}> <option value="normal">{I18n.t('routes.edit.stop_point.alighting.normal')}</option> <option value="forbidden">{I18n.t('routes.edit.stop_point.alighting.forbidden')}</option> </select> |
