mirror of
https://github.com/strapi/strapi.git
synced 2025-08-27 18:25:49 +00:00
Add new input lib to EditPage container
This commit is contained in:
parent
9740ab3869
commit
5b27933d66
@ -34,7 +34,7 @@ const inputs = {
|
||||
|
||||
function InputsIndex(props) {
|
||||
const Input = inputs[props.type] ? inputs[props.type] : DefaultInputError;
|
||||
const inputValue = props.type === 'checkbox' ? props.value || false : props.value || '';
|
||||
const inputValue = props.type === 'checkbox' || props.type === 'toggle' ? props.value || false : props.value || '';
|
||||
|
||||
return <Input {...props} value={inputValue} />;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import cn from 'classnames';
|
||||
|
||||
// Design
|
||||
import BackHeader from 'components/BackHeader';
|
||||
import Input from 'components/Input';
|
||||
import Input from 'components/InputsIndex';
|
||||
import InputSearch from 'components/InputSearch';
|
||||
import PluginHeader from 'components/PluginHeader';
|
||||
import Plugins from 'components/Plugins';
|
||||
@ -159,7 +159,7 @@ export class EditPage extends React.Component { // eslint-disable-line react/pre
|
||||
customBootstrapClass="col-md-12"
|
||||
errors={get(this.props.editPage, ['formErrors', findIndex(this.props.editPage.formErrors, ['name', 'name']), 'errors'])}
|
||||
didCheckErrors={this.props.editPage.didCheckErrors}
|
||||
label="users-permissions.EditPage.form.roles.label.name"
|
||||
label={{ id: 'users-permissions.EditPage.form.roles.label.name' }}
|
||||
name="name"
|
||||
onChange={this.props.onChangeInput}
|
||||
type="text"
|
||||
@ -170,7 +170,7 @@ export class EditPage extends React.Component { // eslint-disable-line react/pre
|
||||
<div className="row">
|
||||
<Input
|
||||
customBootstrapClass="col-md-12"
|
||||
label="users-permissions.EditPage.form.roles.label.description"
|
||||
label={{ id: 'users-permissions.EditPage.form.roles.label.description' }}
|
||||
name="description"
|
||||
onChange={this.props.onChangeInput}
|
||||
type="textarea"
|
||||
|
Loading…
x
Reference in New Issue
Block a user