diff --git a/packages/strapi-helper-plugin/lib/src/components/InputFileWithErrors/index.js b/packages/strapi-helper-plugin/lib/src/components/InputFileWithErrors/index.js index d9d8a804f0..515ea4727d 100644 --- a/packages/strapi-helper-plugin/lib/src/components/InputFileWithErrors/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/InputFileWithErrors/index.js @@ -73,7 +73,7 @@ class InputFileWithErrors extends React.Component { InputFileWithErrors.defaultProps = { className: '', - customBootstrapClass: 'col-md-6', + customBootstrapClass: 'col-md-12', inputDescription: '', inputDescriptionClassName: '', inputDescriptionStyle: {}, diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Edit/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Edit/index.js index 599428e904..053b9c97e8 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/Edit/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Edit/index.js @@ -70,6 +70,7 @@ class Edit extends React.PureComponent { setLayout = (props) => { const currentLayout = get(props.layout, [props.modelName, 'attributes']); const displayedFields = merge(this.getUploadRelations(props), get(currentLayout), omit(props.schema.fields, 'id')); + this.setState({ currentLayout, displayedFields }); } @@ -125,11 +126,13 @@ class Edit extends React.PureComponent { fileRelationAllowMultipleUpload = (relationName) => has(this.props.schema, ['relations', relationName, 'collection']); + orderAttributes = (displayedFields) => Object.keys(displayedFields).sort(name => Object.keys(this.getUploadRelations(this.props)).includes(name)); + render(){ return (
- {Object.keys(this.state.displayedFields).map((attr, key) => { + {this.orderAttributes(this.state.displayedFields).map((attr, key) => { const details = this.state.displayedFields[attr]; // Retrieve the input's bootstrapClass from the layout const layout = this.getInputLayout(attr); diff --git a/packages/strapi-plugin-content-manager/controllers/ContentManager.js b/packages/strapi-plugin-content-manager/controllers/ContentManager.js index a90e275b33..194920f093 100755 --- a/packages/strapi-plugin-content-manager/controllers/ContentManager.js +++ b/packages/strapi-plugin-content-manager/controllers/ContentManager.js @@ -79,7 +79,7 @@ module.exports = { update: async ctx => { const { source } = ctx.request.query; - + console.log('hhhh', ctx.request.body); try { // Return the last one which is the current model. ctx.body = await strapi.plugins['content-manager'].services['contentmanager'].edit(ctx.params, ctx.request.body, source); diff --git a/packages/strapi-plugin-upload/admin/src/containers/HomePage/saga.js b/packages/strapi-plugin-upload/admin/src/containers/HomePage/saga.js index 7f6d47024f..c1b6a8ff76 100755 --- a/packages/strapi-plugin-upload/admin/src/containers/HomePage/saga.js +++ b/packages/strapi-plugin-upload/admin/src/containers/HomePage/saga.js @@ -87,7 +87,7 @@ function* search() { } : {}; const response = yield call(request, requestURL, { method: 'GET', params }); const entries = response.length === 0 ? [] : response.map(obj => Map(obj)); - + yield put(onSearchSuccess(entries)); } catch(err) { strapi.notification.error('notification.error');