quintodrome/ui/src/user/UserCreate.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
686 B
JavaScript
Raw Normal View History

2020-01-19 17:39:37 -09:00
import React from 'react'
import {
BooleanInput,
Create,
TextInput,
PasswordInput,
required,
2020-01-20 05:54:29 -09:00
email,
2020-01-19 17:39:37 -09:00
SimpleForm,
} from 'react-admin'
import { Title } from '../common'
2020-01-19 17:39:37 -09:00
const UserCreate = (props) => (
<Create title={<Title subTitle={'Create User'} />} {...props}>
2020-01-19 17:39:37 -09:00
<SimpleForm redirect="list">
2020-01-20 05:54:29 -09:00
<TextInput source="userName" validate={[required()]} />
2020-01-19 17:39:37 -09:00
<TextInput source="name" validate={[required()]} />
2020-01-20 05:54:29 -09:00
<TextInput source="email" validate={[required(), email()]} />
2020-01-19 17:39:37 -09:00
<PasswordInput source="password" validate={[required()]} />
2020-04-03 17:03:34 -08:00
<BooleanInput source="isAdmin" defaultValue={false} />
2020-01-19 17:39:37 -09:00
</SimpleForm>
</Create>
)
export default UserCreate