|
@@ -4,7 +4,7 @@ import {
|
|
|
BooleanField,
|
|
|
EmailField,
|
|
|
NumberField,
|
|
|
- RadioBooleanField,
|
|
|
+ RadioField,
|
|
|
TextField,
|
|
|
} from 'sentry/components/forms';
|
|
|
import {t, tct} from 'sentry/locale';
|
|
@@ -15,10 +15,13 @@ type Section = {
|
|
|
heading?: string;
|
|
|
};
|
|
|
|
|
|
+// TODO(epurkhiser): This should really use the types from the form system, but
|
|
|
+// they're still pretty bad so that's difficult I guess?
|
|
|
type Field = {
|
|
|
key: string;
|
|
|
label: React.ReactNode;
|
|
|
allowEmpty?: boolean;
|
|
|
+ choices?: [value: string, label: string][];
|
|
|
component?: React.ComponentType<any>;
|
|
|
defaultValue?: () => string | number | false;
|
|
|
disabled?: boolean;
|
|
@@ -26,12 +29,9 @@ type Field = {
|
|
|
help?: React.ReactNode;
|
|
|
max?: number;
|
|
|
min?: number;
|
|
|
- noLabel?: string;
|
|
|
placeholder?: string;
|
|
|
required?: boolean;
|
|
|
step?: number;
|
|
|
- yesFirst?: boolean;
|
|
|
- yesLabel?: string;
|
|
|
};
|
|
|
|
|
|
// This are ordered based on their display order visually
|
|
@@ -246,11 +246,12 @@ const definitions: Field[] = [
|
|
|
{
|
|
|
key: 'beacon.anonymous',
|
|
|
label: 'Usage Statistics',
|
|
|
- component: RadioBooleanField,
|
|
|
+ component: RadioField,
|
|
|
// yes and no are inverted here due to the nature of this configuration
|
|
|
- noLabel: 'Send my contact information along with usage statistics',
|
|
|
- yesLabel: 'Please keep my usage information anonymous',
|
|
|
- yesFirst: false,
|
|
|
+ choices: [
|
|
|
+ ['false', 'Send my contact information along with usage statistics'],
|
|
|
+ ['true', 'Please keep my usage information anonymous'],
|
|
|
+ ],
|
|
|
help: tct(
|
|
|
'If enabled, any stats reported to sentry.io will exclude identifying information (such as your administrative email address). By anonymizing your installation the Sentry team will be unable to contact you about security updates. For more information on what data is sent to Sentry, see the [link:documentation].',
|
|
|
{
|