Work in progress on confirmation dialogs displayed when one navigates from a page with unsaved changes.
Optimized imports.
This commit is contained in:
parent
3921a6b2cb
commit
008fd21b51
30 changed files with 324 additions and 231 deletions
|
@ -4,7 +4,18 @@ import React, {Component} from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import {withTranslation} from '../lib/i18n';
|
||||
import {LinkButton, requiresAuthenticatedUser, Title, withPageHelpers} from '../lib/page';
|
||||
import {Button, ButtonRow, Form, FormSendMethod, InputField, TextArea, TreeTableSelect, withForm} from '../lib/form';
|
||||
import {
|
||||
Button,
|
||||
ButtonRow,
|
||||
filterData,
|
||||
Form,
|
||||
FormSendMethod,
|
||||
InputField,
|
||||
TextArea,
|
||||
TreeTableSelect,
|
||||
withForm,
|
||||
withFormErrorHandlers
|
||||
} from '../lib/form';
|
||||
import axios from '../lib/axios';
|
||||
import {withAsyncErrorHandler, withErrorHandling} from '../lib/error-handling';
|
||||
import interoperableErrors from '../../../shared/interoperable-errors';
|
||||
|
@ -35,6 +46,10 @@ export default class CUD extends Component {
|
|||
entity: PropTypes.object
|
||||
}
|
||||
|
||||
submitFormValuesMutator(data) {
|
||||
return filterData(data, ['name', 'description', 'namespace']);
|
||||
}
|
||||
|
||||
isEditGlobal() {
|
||||
return this.props.entity && this.props.entity.id === getGlobalNamespaceId();
|
||||
}
|
||||
|
@ -106,6 +121,7 @@ export default class CUD extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
@withFormErrorHandlers
|
||||
async submitHandler(submitAndLeave) {
|
||||
const t = this.props.t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue