Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct input type for edit team attributes #422

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/components/edit-team-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ export default function EditTeamForm({
}
if (orgTeamTags.length > 0) {
extraOrgTeamFields = orgTeamTags.map(
({ id, name, required, description }) => {
({ id, name, key_type, required, description }) => {
return (
<FormControl isRequired={required} key={`extra-tag-${id}`}>
<FormLabel htmlFor={`extra-tag-${id}`}>{name}</FormLabel>
<Field
as={Input}
type='text'
type={key_type}
name={`tags.key-${id}`}
id={`extra-tag-${id}`}
required={required}
Expand All @@ -106,13 +106,13 @@ export default function EditTeamForm({

if (teamTags.length > 0) {
extraTeamFields = teamTags.map(
({ id, name, required, description }) => {
({ id, name, key_type, required, description }) => {
return (
<FormControl isRequired={required} key={`extra-tag-${id}`}>
<FormLabel htmlFor={`extra-tag-${id}`}>{name}</FormLabel>
<Field
as={Input}
type='text'
type={key_type}
name={`tags.key-${id}`}
id={`extra-tag-${id}`}
required={required}
Expand All @@ -130,7 +130,7 @@ export default function EditTeamForm({
return (
<Form>
<VStack alignItems={'flex-start'}>
<Heading variant='sectionHead'>Details</Heading>
<Heading variant='sectionHead'>Team Details</Heading>
<FormControl isRequired isInvalid={errors.name}>
<FormLabel htmlFor='name'>Name</FormLabel>
<Field
Expand Down Expand Up @@ -223,7 +223,7 @@ export default function EditTeamForm({
)}
{extraOrgTeamFields.length > 0 ? (
<>
<Heading as='h3' size='sm'>
<Heading as='h3' size='sm' variant='sectionHead'>
Organization Attributes
</Heading>
{extraOrgTeamFields}
Expand All @@ -233,7 +233,7 @@ export default function EditTeamForm({
)}
{extraTeamFields.length > 0 ? (
<>
<Heading as='h3' size='sm'>
<Heading as='h3' size='sm' variant='sectionHead'>
Other Team Attributes
</Heading>
{extraTeamFields}
Expand Down