diff --git a/client/src/lib/form.js b/client/src/lib/form.js index 674949ac..b1fd8547 100644 --- a/client/src/lib/form.js +++ b/client/src/lib/form.js @@ -238,7 +238,7 @@ class InputField extends Component { } return wrapInput(id, htmlId, owner, props.format, '', props.label, props.help, - owner.updateFormValue(id, evt.target.value)}/> + owner.updateFormValue(id, evt.target.value)}/> ); } } @@ -290,7 +290,7 @@ class TextArea extends Component { const htmlId = 'form_' + id; return wrapInput(id, htmlId, owner, props.format, '', props.label, props.help, - + ); } } @@ -841,10 +841,14 @@ function withForm(target) { }) }; - const onChangeCallbacks = this.state.formSettings.onChange || {}; + const onChangeCallback = this.state.formSettings.onChange || {}; - if (onChangeCallbacks[key]) { - onChangeCallbacks[key](newState, key, oldValue, value); + if (typeof onChangeCallback === 'object') { + if (onChangeCallback[key]) { + onChangeCallback[key](newState, key, oldValue, value); + } + } else { + onChangeCallback(newState, key, oldValue, value); } return newState; diff --git a/client/src/lists/fields/CUD.js b/client/src/lists/fields/CUD.js index c2f15208..433697ed 100644 --- a/client/src/lists/fields/CUD.js +++ b/client/src/lists/fields/CUD.js @@ -433,8 +433,8 @@ export default class CUD extends Component { stateOwner={this} visible={this.props.action === 'delete'} deleteUrl={`/rest/fields/${this.props.list.id}/${this.props.entity.id}`} - cudUrl={`/lists/fields/${this.props.list.id}/${this.props.entity.id}/edit`} - listUrl={`/lists/fields/${this.props.list.id}`} + cudUrl={`/lists/${this.props.list.id}/fields/${this.props.entity.id}/edit`} + listUrl={`/lists/${this.props.list.id}/fields`} deletingMsg={t('Deleting field ...')} deletedMsg={t('Field deleted')}/> } @@ -464,7 +464,7 @@ export default class CUD extends Component {