mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Merge branch 'relation/users' of github.com:strapi/strapi into relation/users
This commit is contained in:
commit
42fd5a6215
@ -165,6 +165,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
value={value}
|
||||
dateFormat='YYYY-MM-DD'
|
||||
timeFormat='HH:mm:ss'
|
||||
tabIndex={this.props.tabIndex}
|
||||
utc={true}
|
||||
inputProps={{
|
||||
placeholder: this.props.placeholder,
|
||||
@ -214,6 +215,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
disabled={this.props.disabled}
|
||||
type="email"
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
@ -244,6 +246,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
autoComplete="off"
|
||||
disabled={this.props.disabled}
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
@ -278,6 +281,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
disabled={this.props.disabled}
|
||||
type={type}
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
@ -366,6 +370,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
disabled={this.props.disabled}
|
||||
type="text"
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
@ -406,6 +411,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
placeholder={placeholder}
|
||||
disabled={this.props.disabled}
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
@ -467,6 +473,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
placeholder={placeholder}
|
||||
disabled={this.props.disabled}
|
||||
autoFocus={this.props.autoFocus}
|
||||
tabIndex={this.props.tabIndex}
|
||||
/>;
|
||||
|
||||
const link = !isEmpty(this.props.linkContent) ? <a href={this.props.linkContent.link} target="_blank"><FormattedMessage id={this.props.linkContent.description} /></a> : '';
|
||||
@ -616,6 +623,7 @@ Input.propTypes = {
|
||||
search: PropTypes.bool,
|
||||
selectOptions: PropTypes.array,
|
||||
selectOptionsFetchSucceeded: PropTypes.bool,
|
||||
tabIndex: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
type: PropTypes.string.isRequired,
|
||||
validations: PropTypes.object.isRequired,
|
||||
@ -644,6 +652,7 @@ Input.defaultProps = {
|
||||
search: false,
|
||||
selectOptions: [],
|
||||
selectOptionsFetchSucceeded: false,
|
||||
tabIndex: '0',
|
||||
value: ''
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ class EditForm extends React.Component {
|
||||
const displayedFields = merge(get(currentLayout), omit(currentSchema.fields, 'id'));
|
||||
|
||||
// List fields inputs
|
||||
const fields = Object.keys(displayedFields).map(attr => {
|
||||
const fields = Object.keys(displayedFields).map((attr, key) => {
|
||||
const details = displayedFields[attr];
|
||||
const errorIndex = findIndex(this.props.formErrors, ['name', attr]);
|
||||
const errors = errorIndex !== -1 ? this.props.formErrors[errorIndex].errors : [];
|
||||
@ -74,6 +74,7 @@ class EditForm extends React.Component {
|
||||
|
||||
return (
|
||||
<Input
|
||||
autoFocus={key === 0}
|
||||
key={attr}
|
||||
type={get(layout, 'type', this.getInputType(details.type))}
|
||||
label={get(layout, 'label') || details.label || ''}
|
||||
|
@ -119,6 +119,7 @@ class PopUpRelations extends React.Component { // eslint-disable-line react/pref
|
||||
return (
|
||||
<ModalBody className={`${styles.modalBody} ${styles.flex}`}>
|
||||
<RelationBox
|
||||
autoFocus
|
||||
tabIndex="1"
|
||||
relationType={get(this.props.values, ['params', 'nature'])}
|
||||
contentTypeTargetPlaceholder={get(this.props.values, ['params', 'target'])}
|
||||
@ -161,7 +162,7 @@ class PopUpRelations extends React.Component { // eslint-disable-line react/pref
|
||||
|
||||
const modalBody = this.props.showRelation ? this.renderModalBodyRelations(): this.renderModalBodyAdvanced();
|
||||
const handleToggle = this.props.toggle;
|
||||
|
||||
|
||||
return (
|
||||
<div className={styles.popUpRelations}>
|
||||
<Modal isOpen={this.props.isOpen} toggle={this.props.toggle} className={`${styles.modalPosition}`}>
|
||||
|
@ -119,6 +119,7 @@ class RelationBox extends React.Component { // eslint-disable-line react/prefer-
|
||||
errors={this.props.errors}
|
||||
didCheckErrors={this.props.didCheckErrors}
|
||||
pluginID="content-type-builder"
|
||||
autoFocus={this.props.autoFocus}
|
||||
/>;
|
||||
|
||||
const dropDown = !isEmpty(this.props.dropDownItems) ? this.renderDropdownMenu() : '';
|
||||
@ -150,6 +151,7 @@ class RelationBox extends React.Component { // eslint-disable-line react/prefer-
|
||||
}
|
||||
|
||||
RelationBox.propTypes = {
|
||||
autoFocus: PropTypes.bool,
|
||||
contentTypeTargetPlaceholder: PropTypes.string,
|
||||
didCheckErrors: PropTypes.bool.isRequired,
|
||||
dropDownItems: PropTypes.array,
|
||||
@ -165,6 +167,7 @@ RelationBox.propTypes = {
|
||||
};
|
||||
|
||||
RelationBox.defaultProps = {
|
||||
autoFocus: false,
|
||||
contentTypeTargetPlaceholder: '',
|
||||
dropDownItems: [],
|
||||
errors: [],
|
||||
|
@ -9,13 +9,15 @@
|
||||
"type": "string",
|
||||
"minLength": 3,
|
||||
"unique": true,
|
||||
"configurable": false
|
||||
"configurable": false,
|
||||
"required": true
|
||||
},
|
||||
"email": {
|
||||
"type": "email",
|
||||
"minLength": 6,
|
||||
"unique": true,
|
||||
"configurable": false
|
||||
"configurable": false,
|
||||
"required": true
|
||||
},
|
||||
"provider": {
|
||||
"type": "string",
|
||||
@ -24,7 +26,8 @@
|
||||
"password": {
|
||||
"type": "password",
|
||||
"minLength": 6,
|
||||
"configurable": false
|
||||
"configurable": false,
|
||||
"required": true
|
||||
},
|
||||
"resetPasswordToken": {
|
||||
"type": "string",
|
||||
@ -36,4 +39,4 @@
|
||||
}
|
||||
},
|
||||
"connection": "default"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user