teamSettingsFields.tsx 875 B

12345678910111213141516171819202122232425262728293031
  1. import {JsonFormObject} from 'sentry/components/forms/type';
  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('Name'),
  16. placeholder: 'e.g. api-team',
  17. help: t('A unique ID used to identify the team'),
  18. disabled: ({access}) => !access.has('team:write'),
  19. transformInput: slugify,
  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;