teamSettingsFields.tsx 879 B

123456789101112131415161718192021222324252627282930
  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. export const route = '/settings/:orgId/teams/:teamId/settings/';
  6. const formGroups: JsonFormObject[] = [
  7. {
  8. // Form "section"/"panel"
  9. title: 'Team Settings',
  10. fields: [
  11. {
  12. name: 'slug',
  13. type: 'string',
  14. required: true,
  15. label: t('Team Slug'),
  16. placeholder: 'e.g. api-team',
  17. help: t('A unique ID used to identify the team'),
  18. transformInput: slugify,
  19. disabled: ({hasTeamWrite}) => !hasTeamWrite,
  20. saveOnBlur: false,
  21. saveMessageAlertType: 'info',
  22. saveMessage: t('You will be redirected to the new team slug after saving'),
  23. },
  24. ],
  25. },
  26. ];
  27. export default formGroups;