mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
Merge branch 'master' into fix-db-args
This commit is contained in:
commit
0cb9f05f9c
@ -119,6 +119,7 @@ module.exports = (scope, cb) => {
|
||||
.then(answers => {
|
||||
if (hasDatabaseConfig) {
|
||||
const databaseChoice = _.find(databaseChoices, ['value.database', scope.database.settings.client]);
|
||||
scope.database.connector = databaseChoice.value.connector;
|
||||
answers.client = {
|
||||
...databaseChoice.value
|
||||
};
|
||||
@ -141,7 +142,7 @@ module.exports = (scope, cb) => {
|
||||
when: !hasDatabaseConfig,
|
||||
type: 'input',
|
||||
prefix: '',
|
||||
name: 'name',
|
||||
name: 'database',
|
||||
message: 'Database name:',
|
||||
default: _.get(scope.database, 'database', 'strapi')
|
||||
},
|
||||
@ -185,10 +186,11 @@ module.exports = (scope, cb) => {
|
||||
},
|
||||
{
|
||||
when: !hasDatabaseConfig,
|
||||
type: 'input',
|
||||
type: 'password',
|
||||
prefix: '',
|
||||
name: 'password',
|
||||
message: 'Password:',
|
||||
mask: '*',
|
||||
default: _.get(scope.database, 'password', undefined)
|
||||
}
|
||||
])
|
||||
@ -200,7 +202,7 @@ module.exports = (scope, cb) => {
|
||||
|
||||
scope.database.settings.host = answers.host;
|
||||
scope.database.settings.port = answers.port;
|
||||
scope.database.settings.database = answers.name;
|
||||
scope.database.settings.database = answers.database;
|
||||
scope.database.settings.username = answers.username;
|
||||
scope.database.settings.password = answers.password;
|
||||
|
||||
|
||||
@ -208,7 +208,10 @@ InputNumberWithErrors.propTypes = {
|
||||
style: PropTypes.object,
|
||||
tabIndex: PropTypes.string,
|
||||
validations: PropTypes.object,
|
||||
value: PropTypes.string.isRequired,
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.number,
|
||||
]),
|
||||
};
|
||||
|
||||
export default InputNumberWithErrors;
|
||||
|
||||
@ -86,7 +86,7 @@ class InputSelectWithErrors extends React.Component {
|
||||
disabled={disabled}
|
||||
error={!isEmpty(this.state.errors)}
|
||||
name={name}
|
||||
onBlur={onBlur}
|
||||
onBlur={isFunction(onBlur) ? onBlur : () => {}}
|
||||
onChange={onChange}
|
||||
onFocus={onFocus}
|
||||
selectOptions={selectOptions}
|
||||
@ -167,7 +167,10 @@ InputSelectWithErrors.propTypes = {
|
||||
labelClassName: PropTypes.string,
|
||||
labelStyle: PropTypes.object,
|
||||
name: PropTypes.string.isRequired,
|
||||
onBlur: PropTypes.func,
|
||||
onBlur: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
PropTypes.func,
|
||||
]),
|
||||
onChange: PropTypes.func.isRequired,
|
||||
onFocus: PropTypes.func,
|
||||
selectOptions: PropTypes.arrayOf(
|
||||
|
||||
@ -8,7 +8,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { isEmpty, map, findIndex } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import Input from 'components/Input';
|
||||
import Input from 'components/InputsIndex';
|
||||
import styles from './styles.scss';
|
||||
|
||||
class InputCheckboxWithNestedInputs extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||
@ -69,7 +69,7 @@ class InputCheckboxWithNestedInputs extends React.Component { // eslint-disable-
|
||||
<div className={`${styles.inputCheckboxWithNestedInputs} col-md-12`}>
|
||||
<div className="form-check" style={{ zIndex: '9999' }}>
|
||||
{title}
|
||||
<FormattedMessage id={this.props.data.label}>
|
||||
<FormattedMessage id={this.props.data.label.id}>
|
||||
{(message) => (
|
||||
<label className={`${styles.checkboxLabel} form-check-label`} htmlFor={this.props.data.name} style={{ cursor: 'pointer' }}>
|
||||
<input
|
||||
|
||||
@ -9,13 +9,45 @@ import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { get, map, includes, split, isEmpty, findIndex } from 'lodash';
|
||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
||||
import Input from 'components/Input';
|
||||
import Input from 'components/InputsIndex';
|
||||
import PopUpHeaderNavLink from 'components/PopUpHeaderNavLink';
|
||||
import styles from './styles.scss';
|
||||
|
||||
/* eslint-disable react/jsx-wrap-multilines */
|
||||
|
||||
class PopUpForm extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||
createComponent = (el) => {
|
||||
if (get(el, ['inputDescription', 'params', 'link', 'children', 'type'], '') === 'FormattedMessage') {
|
||||
return (
|
||||
<FormattedMessage id={get(el, ['inputDescription', 'params', 'link', 'children', 'attr', 'id'], 'default')} defaultMessage=" ">
|
||||
{(message) => (
|
||||
React.createElement(
|
||||
// Create the wrapper component
|
||||
// This line will create the link
|
||||
get(el, ['inputDescription', 'params', 'link', 'parent', 'type'], 'span'),
|
||||
// Set the attributes
|
||||
get(el, ['inputDescription', 'params', 'link', 'parent', 'attr'], ''),
|
||||
message,
|
||||
)
|
||||
)}
|
||||
</FormattedMessage>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
React.createElement(
|
||||
get(el, ['inputDescription', 'params', 'link', 'parent', 'type'], 'span'),
|
||||
// Set the attributes
|
||||
get(el, ['inputDescription', 'params', 'link', 'parent', 'attr'], ''),
|
||||
React.createElement(
|
||||
get(el, ['inputDescription', 'params', 'link', 'children', 'type'], 'span'),
|
||||
get(el, ['inputDescription', 'params', 'link', 'children', 'attr'], ''),
|
||||
get(el, ['inputDescription', 'params', 'link', 'children', 'innerHTML'], ''),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
renderInput = (item, key) => {
|
||||
// const customBootstrapClass = 'col-md-6'
|
||||
let customBootstrapClass = item.type === 'textarea' ?
|
||||
@ -36,6 +68,12 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st
|
||||
const handleBlur = shouldOverrideHandleBlur ? this.props.onBlur : false;
|
||||
const errorIndex = findIndex(this.props.formErrors, ['name', item.name]);
|
||||
const errors = errorIndex !== -1 ? this.props.formErrors[errorIndex].errors : [];
|
||||
const inputDescription = {
|
||||
id: get(item, ['inputDescription', 'id'], ''),
|
||||
params: {
|
||||
link: this.createComponent(item),
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<Input
|
||||
@ -46,7 +84,7 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st
|
||||
label={item.label}
|
||||
name={item.name}
|
||||
validations={item.validations}
|
||||
inputDescription={item.inputDescription}
|
||||
inputDescription={inputDescription}
|
||||
value={value}
|
||||
customBootstrapClass={customBootstrapClass}
|
||||
selectOptions={this.props.selectOptions || []}
|
||||
@ -54,8 +92,6 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st
|
||||
title={item.title}
|
||||
errors={errors}
|
||||
didCheckErrors={this.props.didCheckErrors}
|
||||
pluginID={this.props.pluginID}
|
||||
linkContent={item.linkContent}
|
||||
autoFocus={key === 0}
|
||||
/>
|
||||
);
|
||||
@ -159,7 +195,6 @@ PopUpForm.propTypes = {
|
||||
PropTypes.bool,
|
||||
PropTypes.func,
|
||||
]),
|
||||
pluginID: PropTypes.string,
|
||||
popUpHeaderNavLinks: PropTypes.array,
|
||||
popUpTitle: PropTypes.string.isRequired,
|
||||
renderCustomPopUpHeader: PropTypes.oneOfType([
|
||||
@ -189,7 +224,6 @@ PopUpForm.defaultProps = {
|
||||
overrideHandleBlurCondition: false,
|
||||
overrideRenderInput: false,
|
||||
overrideRenderInputCondition: false,
|
||||
pluginID: 'content-type-builder',
|
||||
popUpHeaderNavLinks: [],
|
||||
renderCustomPopUpHeader: false,
|
||||
routePath: '',
|
||||
|
||||
@ -10,7 +10,7 @@ import { findIndex, get, isEmpty, map, take, takeRight } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
||||
import Input from 'components/Input';
|
||||
import Input from 'components/InputsIndex';
|
||||
import PopUpHeaderNavLink from 'components/PopUpHeaderNavLink';
|
||||
import RelationBox from 'components/RelationBox';
|
||||
import RelationNaturePicker from 'components/RelationNaturePicker';
|
||||
|
||||
@ -11,7 +11,7 @@ import { get, isEmpty, map, startCase } from 'lodash';
|
||||
import pluralize from 'pluralize';
|
||||
|
||||
import { ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
||||
import Input from 'components/Input';
|
||||
import Input from 'components/InputsIndex';
|
||||
import styles from './styles.scss';
|
||||
|
||||
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.contentType.item.connections",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.contentType.item.connections"
|
||||
},
|
||||
"name": "connection",
|
||||
"type": "select",
|
||||
"value": "default",
|
||||
@ -13,21 +15,40 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.contentType.item.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.contentType.item.name"
|
||||
},
|
||||
"name": "name",
|
||||
"value": "",
|
||||
"type": "string",
|
||||
"validations": {
|
||||
"required": true
|
||||
},
|
||||
"inputDescription": "content-type-builder.form.contentType.item.name.description",
|
||||
"linkContent": {
|
||||
"description": "content-type-builder.form.contentType.item.name.link.description",
|
||||
"link": "https://v3.strapi.io/documentation/concepts/concepts.html#models"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.contentType.item.name.description",
|
||||
"params": {
|
||||
"link": {
|
||||
"parent": {
|
||||
"type": "a",
|
||||
"attr": {
|
||||
"href": "https://v3.strapi.io/documentation/concepts/concepts.html#models",
|
||||
"target": "_blank"
|
||||
}
|
||||
},
|
||||
"children": {
|
||||
"type": "FormattedMessage",
|
||||
"attr": {
|
||||
"id": "content-type-builder.form.contentType.item.name.link.description"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.contentType.item.description",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.contentType.item.description"
|
||||
},
|
||||
"name": "description",
|
||||
"value": "",
|
||||
"type": "textarea",
|
||||
@ -39,12 +60,16 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.contentType.item.collectionName",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.contentType.item.collectionName"
|
||||
},
|
||||
"name": "collectionName",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.contentType.item.collectionName.inputDescription"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.contentType.item.collectionName.inputDescription"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -94,7 +119,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.textarea.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.textarea.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -107,24 +134,36 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.minimumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.minimumLength"
|
||||
},
|
||||
"name": "params.minLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -142,7 +181,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.maximumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.maximumLength"
|
||||
},
|
||||
"name": "params.maxLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -166,7 +207,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.number.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.number.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -175,7 +218,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.number.type",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.number.type"
|
||||
},
|
||||
"name": "params.type",
|
||||
"type": "select",
|
||||
"value": "integer",
|
||||
@ -193,24 +238,36 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.minimum",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.minimum"
|
||||
},
|
||||
"name": "params.min",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -228,7 +285,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.maximum",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.maximum"
|
||||
},
|
||||
"name": "params.max",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -252,7 +311,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.string.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.string.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -265,24 +326,36 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.minimumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.minimumLength"
|
||||
},
|
||||
"name": "params.minLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -300,7 +373,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.maximumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.maximumLength"
|
||||
},
|
||||
"name": "params.maxLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -324,7 +399,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.string.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.string.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -337,24 +414,36 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.minimumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.minimumLength"
|
||||
},
|
||||
"name": "params.minLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -372,7 +461,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.maximumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.maximumLength"
|
||||
},
|
||||
"name": "params.maxLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -396,7 +487,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.string.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.string.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -409,16 +502,24 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.minimumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.minimumLength"
|
||||
},
|
||||
"name": "params.minLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -436,7 +537,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.maximumLength",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.maximumLength"
|
||||
},
|
||||
"name": "params.maxLength",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
@ -460,7 +563,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.date.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.date.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -473,21 +578,31 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -496,7 +611,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.boolean.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.boolean.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -509,21 +626,31 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -532,7 +659,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.json.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.json.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -545,21 +674,31 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -568,7 +707,9 @@
|
||||
"baseSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.media.name",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.media.name"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -581,21 +722,31 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"title": "content-type-builder.form.attribute.item.settings.name",
|
||||
"label": "content-type-builder.form.attribute.item.requiredField",
|
||||
"title": {
|
||||
"id": "content-type-builder.form.attribute.item.settings.name"
|
||||
},
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField"
|
||||
},
|
||||
"name": "params.required",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.requiredField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -604,7 +755,9 @@
|
||||
"defineRelation": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.defineRelation.fieldName",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.defineRelation.fieldName"
|
||||
},
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -614,7 +767,9 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.defineRelation.fieldName",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.defineRelation.fieldName"
|
||||
},
|
||||
"name": "params.key",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
@ -628,20 +783,28 @@
|
||||
"advancedSettings": {
|
||||
"items": [
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.uniqueField",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField"
|
||||
},
|
||||
"name": "params.unique",
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.uniqueField.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "content-type-builder.form.attribute.item.customColumnName",
|
||||
"label": {
|
||||
"id": "content-type-builder.form.attribute.item.customColumnName"
|
||||
},
|
||||
"name": "params.columnName",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
"validations": {},
|
||||
"inputDescription": "content-type-builder.form.attribute.item.customColumnName.description"
|
||||
"inputDescription": {
|
||||
"id": "content-type-builder.form.attribute.item.customColumnName.description"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
"form.contentType.item.connections": "Connection",
|
||||
"form.contentType.item.name": "Name",
|
||||
"form.contentType.item.name.description": "Content type name's should be singular",
|
||||
"form.contentType.item.name.description": "Content type name's should be singular, {link}",
|
||||
"form.contentType.item.name.link.description": "check out our documentation",
|
||||
"form.contentType.item.description": "Description",
|
||||
"form.contentType.item.description.placeholder": "Write your little description here...",
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
"form.contentType.item.connections": "Connexion",
|
||||
"form.contentType.item.name": "Nom",
|
||||
"form.contentType.item.name.description": "Les noms de modèles doivent être au singulier",
|
||||
"form.contentType.item.name.description": "Les noms de modèles doivent être au singulier, {link}",
|
||||
"form.contentType.item.name.link.description": "regardez la documentation",
|
||||
"form.contentType.item.description": "Description",
|
||||
"form.contentType.item.description.placeholder": "Ecrivez votre petite description ici...",
|
||||
|
||||
@ -79,7 +79,7 @@ module.exports = {
|
||||
return new Promise((resolve, reject) => {
|
||||
const scope = {
|
||||
generatorType: 'api',
|
||||
id: name,
|
||||
id: name.toLowerCase(),
|
||||
rootPath: strapi.config.appPath,
|
||||
args: {
|
||||
api: name,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user