Merge pull request #631 from sharetribe/example-custom-attributes-disabled-by-default

Disable example custom attributes by default
This commit is contained in:
Kimmo Puputti 2018-01-09 13:35:24 +02:00 committed by GitHub
commit 6d3f36709d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 47 deletions

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ build
.DS_Store
.env
npm-debug.log
/.env.development.local

View file

@ -228,7 +228,7 @@ const stripeSupportedCountries = [
// },
// },
// }
const customAttributes = {
const exampleCustomAttributes = {
category: {
select: 'single', // possible values: 'single' (only type supported atm.)
type: 'string',
@ -236,6 +236,12 @@ const customAttributes = {
},
};
// To use the example custom attributes, set the
// REACT_APP_USE_EXAMPLE_CUSTOM_ATTRIBUTES variable to `true` in the
// gitignored `.env.development.local` file
const useExampleCustomAttributes = process.env.REACT_APP_USE_EXAMPLE_CUSTOM_ATTRIBUTES === 'true';
const customAttributes = useExampleCustomAttributes ? exampleCustomAttributes : {};
// Address information is used in SEO schema for Organization (http://schema.org/PostalAddress)
const addressCountry = 'FI';
const addressRegion = 'Helsinki';

View file

@ -54,52 +54,6 @@ exports[`EditListingDescriptionForm matches snapshot 1`] = `
value=""
/>
</div>
<div
className=""
>
<label
htmlFor="fakeTestForm.category"
>
FieldCustomAttributeSelect.category.label
</label>
<select
className=""
id="fakeTestForm.category"
name="category"
onBlur={[Function]}
onChange={[Function]}
onDragStart={[Function]}
onDrop={[Function]}
onFocus={[Function]}
value=""
>
<option
value=""
>
FieldCustomAttributeSelect.category.placeholder
</option>
<option
value="road"
>
FieldCustomAttributeSelect.category.option.road
</option>
<option
value="mountain"
>
FieldCustomAttributeSelect.category.option.mountain
</option>
<option
value="track"
>
FieldCustomAttributeSelect.category.option.track
</option>
<option
value="other"
>
FieldCustomAttributeSelect.category.option.other
</option>
</select>
</div>
<button
className=""
disabled={true}