Add avatar url and edit theepids to user

This commit is contained in:
dklimpel 2020-03-27 22:12:49 +01:00
parent 7eeb60539f
commit 60222c346e
3 changed files with 25 additions and 0 deletions

View File

@ -14,6 +14,9 @@ import {
TextInput,
ReferenceField,
regex,
SelectInput,
ArrayInput,
SimpleFormIterator,
} from "react-admin";
const UserFilter = props => (
@ -81,7 +84,17 @@ export const UserEdit = props => (
<Edit {...props}>
<SimpleForm>
<TextInput source="id" disabled />
<TextInput source="avatar_url" disabled />
<TextInput source="displayname" />
<ArrayInput source="threepids">
<SimpleFormIterator>
<SelectInput source="medium" choices={[
{ id: 'email', name: 'resources.users.email' },
{ id: 'msisdn', name: 'resources.users.msisdn' },
]} />
<TextInput source="address" />
</SimpleFormIterator>
</ArrayInput>
<PasswordInput source="password" autoComplete="new-password" />
<BooleanInput source="admin" />
<BooleanInput source="deactivated" />

View File

@ -15,6 +15,8 @@ export default {
resources: {
users: {
name: "Benutzer",
email: "E-Mail",
msisdn: "Telefon",
fields: {
avatar: "Avatar",
id: "Benutzer-ID",
@ -27,6 +29,10 @@ export default {
user_id: "Suche Benutzer",
displayname: "Anzeigename",
password: "Passwort",
avatar_url: "Avatar URL",
medium: "Medium",
threepids: "3PIDs",
address: "Adresse",
},
},
rooms: {

View File

@ -15,6 +15,8 @@ export default {
resources: {
users: {
name: "User |||| Users",
email: "Email",
msisdn: "Phone",
fields: {
avatar: "Avatar",
id: "User-ID",
@ -27,6 +29,10 @@ export default {
user_id: "Search user",
displayname: "Displayname",
password: "Password",
avatar_url: "Avatar URL",
medium: "Medium",
threepids: "3PIDs",
address: "Address",
},
},
rooms: {