diff options
| author | Zog | 2018-05-04 09:51:37 +0200 | 
|---|---|---|
| committer | cedricnjanga | 2018-05-06 21:09:26 -0700 | 
| commit | 3750a1da0650b692046d7422537a310ba5c5bfd6 (patch) | |
| tree | db7a23a06bb659b816e3389d86d51cb8707ff17f /app | |
| parent | 343133fc64d100d16b584d4ab60d641c56965ca2 (diff) | |
| download | chouette-core-3750a1da0650b692046d7422537a310ba5c5bfd6.tar.bz2 | |
Refs #6550; Fix CustomFields edition for JourneyPatterns
Diffstat (limited to 'app')
| -rw-r--r-- | app/javascript/helpers/CustomFieldsInputs.js | 4 | ||||
| -rw-r--r-- | app/javascript/journey_patterns/reducers/journeyPatterns.js | 1 | 
2 files changed, 3 insertions, 2 deletions
| diff --git a/app/javascript/helpers/CustomFieldsInputs.js b/app/javascript/helpers/CustomFieldsInputs.js index 0a57e7566..93611538e 100644 --- a/app/javascript/helpers/CustomFieldsInputs.js +++ b/app/javascript/helpers/CustomFieldsInputs.js @@ -43,7 +43,7 @@ export default class CustomFieldsInputs extends Component {          ref={'custom_fields.' + cf.code}          className='form-control'          disabled={this.props.disabled} -        value={cf.value || this.options(cf).default} +        value={cf.value || this.options(cf).default || ""}          onChange={(e) => {this.props.onUpdate(cf.code, e.target.value); this.forceUpdate()} }          />      ) @@ -56,7 +56,7 @@ export default class CustomFieldsInputs extends Component {          ref={'custom_fields.' + cf.code}          className='form-control'          disabled={this.props.disabled} -        value={cf.value || this.options(cf).default} +        value={cf.value || this.options(cf).default || ""}          onChange={(e) => {this.props.onUpdate(cf.code, e.target.value); this.forceUpdate()} }          />      ) diff --git a/app/javascript/journey_patterns/reducers/journeyPatterns.js b/app/javascript/journey_patterns/reducers/journeyPatterns.js index 1a6a27da6..9dcd82082 100644 --- a/app/javascript/journey_patterns/reducers/journeyPatterns.js +++ b/app/javascript/journey_patterns/reducers/journeyPatterns.js @@ -18,6 +18,7 @@ const journeyPattern = (state = {}, action) =>{          registration_number: action.data.registration_number.value,          stop_points: stopPoints,          costs: {}, +        custom_fields: action.data.custom_fields,          deletable: false        }      case 'UPDATE_CHECKBOX_VALUE': | 
