delete firstName and lastName from form when creating a user
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Fri, 7 Dec 2018 08:48:09 +0000 (09:48 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Fri, 7 Dec 2018 08:48:09 +0000 (09:48 +0100)
Feature #14504

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/users/users-actions.ts
src/views-components/dialog-create/dialog-user-create.tsx
src/views-components/form-fields/user-form-fields.tsx

index 7494f9833e8fcc7be5791b1d3956f0e4f47da82f..f39c753ea40e50bbe2ecb7f40df047d9297c9917 100644 (file)
@@ -19,8 +19,6 @@ export const USER_ATTRIBUTES_DIALOG = 'userAttributesDialog';
 export const USER_CREATE_FORM_NAME = 'repositoryCreateFormName';
 
 export interface UserCreateFormDialogData {
-    firstName: string;
-    lastName: string;
     email: string;
     identityUrl: string;
     virtualMachineName: string;
index 80904397ec6b10ce386b3334b219232ff1ae8b19..14365af7d6c69f1d8dddc91fc486b6d807969326 100644 (file)
@@ -6,7 +6,7 @@ import * as React from 'react';
 import { InjectedFormProps } from 'redux-form';
 import { WithDialogProps } from '~/store/dialog/with-dialog';
 import { FormDialog } from '~/components/form-dialog/form-dialog';
-import { UserFirstNameField, UserLastNameField, UserEmailField, UserIdentityUrlField, UserVirtualMachineField, UserGroupsVirtualMachineField } from '~/views-components/form-fields/user-form-fields';
+import { UserEmailField, UserIdentityUrlField, UserVirtualMachineField, UserGroupsVirtualMachineField } from '~/views-components/form-fields/user-form-fields';
 
 export type DialogUserProps = WithDialogProps<{}> & InjectedFormProps<any>;
 
@@ -19,8 +19,6 @@ export const UserRepositoryCreate = (props: DialogUserProps) =>
     />;
 
 const UserAddFields = (props: DialogUserProps) => <span>
-    <UserFirstNameField />
-    <UserLastNameField />
     <UserEmailField />
     <UserIdentityUrlField />
     <UserVirtualMachineField data={props.data}/>
index 486d90f70932c9f7d7083f0caa3db6a146be9482..856344492f72f6fe361a2e0c6858f9f0c347a29b 100644 (file)
@@ -10,22 +10,6 @@ import { NativeSelectField } from "~/components/select-field/select-field";
 import { InputLabel } from "@material-ui/core";
 import { VirtualMachinesResource } from "~/models/virtual-machines";
 
-export const UserFirstNameField = () =>
-    <Field
-        name='firstName'
-        component={TextField}
-        validate={USER_LENGTH_VALIDATION}
-        autoFocus={true}
-        label="First name" />;
-
-export const UserLastNameField = () =>
-    <Field
-        name='lastName'
-        component={TextField}
-        validate={USER_LENGTH_VALIDATION}
-        autoFocus={true}
-        label="Last name" />;
-
 export const UserEmailField = () =>
     <Field
         name='email'