teamSettingsFields.tsx 930 B

12345678910111213141516171819202122232425262728293031
  1. import type {JsonFormObject} from 'sentry/components/forms/types';
  2. import {t} from 'sentry/locale';
  3. import slugify from 'sentry/utils/slugify';
  4. // Export route to make these forms searchable by label/help
  5. // TODO: :teamId is not a valid route parameter
  6. // export const route = '/settings/:orgId/teams/:teamId/settings/';
  7. const formGroups: JsonFormObject[] = [
  8. {
  9. // Form "section"/"panel"
  10. title: 'Team Settings',
  11. fields: [
  12. {
  13. name: 'slug',
  14. type: 'string',
  15. required: true,
  16. label: t('Team Slug'),
  17. placeholder: 'e.g. api-team',
  18. help: t('A unique ID used to identify the team'),
  19. transformInput: slugify,
  20. disabled: ({hasTeamWrite}) => !hasTeamWrite,
  21. saveOnBlur: false,
  22. saveMessageAlertType: 'info',
  23. saveMessage: t('You will be redirected to the new team slug after saving'),
  24. },
  25. ],
  26. },
  27. ];
  28. export default formGroups;