Skip to content

Commit

Permalink
Added placeholders product fields (#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemurray authored and Aaron Judd committed Oct 6, 2016
1 parent d49a0b3 commit 5a5c4ed
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,48 +113,58 @@ class ProductAdmin extends Component {
/>
<CardBody>
<TextField
i18nKeyLabel="productDetailEdit.productTitle"
i18nKeyLabel="productDetailEdit.title"
i18nKeyPlaceholder="productDetailEdit.title"
label="Title"
multiline={true}
name="title"
onBlur={this.handleFieldBlur}
onChange={this.handleFieldChange}
placeholder="Title"
value={this.product.title}
/>
<TextField
helpText={this.permalink}
i18nKeyLabel="productDetailEdit.permalink"
i18nKeyPlaceholder="productDetailEdit.permalink"
label="Permalink"
name="handle"
onBlur={this.handleFieldBlur}
onChange={this.handleFieldChange}
placeholder="Permalink"
value={this.product.handle}
/>
<TextField
i18nKeyLabel="productDetailEdit.pageTitle"
i18nKeyPlaceholder="productDetailEdit.pageTitle"
label="Subtitle"
multiline={true}
name="pageTitle"
onBlur={this.handleFieldBlur}
onChange={this.handleFieldChange}
placeholder="Subtitle"
value={this.product.pageTitle}
/>
<TextField
i18nKeyLabel="productDetailEdit.vendor"
i18nKeyPlaceholder="productDetailEdit.vendor"
label="Vendor"
multiline={true}
name="vendor"
onBlur={this.handleFieldBlur}
onChange={this.handleFieldChange}
placeholder="Vendor"
value={this.product.vendor}
/>
<TextField
i18nKeyLabel="productDetailEdit.description"
i18nKeyPlaceholder="productDetailEdit.description"
label="Description"
multiline={true}
name="description"
onBlur={this.handleFieldBlur}
onChange={this.handleFieldChange}
placeholder="Description"
value={this.product.description}
/>
<Divider />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class ProductDetail extends Component {
element={<h1 />}
onProductFieldChange={this.props.handleProductFieldChange}
product={this.product}
textFieldProps={{
i18nKeyPlaceholder: "productDetailEdit.title",
placeholder: "Title"
}}
/>

<ProductField
Expand All @@ -44,6 +48,10 @@ class ProductDetail extends Component {
element={<h2 />}
onProductFieldChange={this.props.handleProductFieldChange}
product={this.product}
textFieldProps={{
i18nKeyPlaceholder: "productDetailEdit.pageTitle",
placeholder: "Subtitle"
}}
/>
</header>

Expand Down Expand Up @@ -79,6 +87,10 @@ class ProductDetail extends Component {
fieldTitle="Vendor"
onProductFieldChange={this.props.handleProductFieldChange}
product={this.product}
textFieldProps={{
i18nKeyPlaceholder: "productDetailEdit.vendor",
placeholder: "Vendor"
}}
/>
</div>

Expand All @@ -90,6 +102,10 @@ class ProductDetail extends Component {
multiline={true}
onProductFieldChange={this.props.handleProductFieldChange}
product={this.product}
textFieldProps={{
i18nKeyPlaceholder: "productDetailEdit.description",
placeholder: "Description"
}}
/>
</div>

Expand Down
2 changes: 1 addition & 1 deletion private/data/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
"parmalink": "Permalink",
"pageTitle": "Subtitle",
"vendor": "Vendor",
"description": "Bescription",
"description": "Description",
"facebookMsg": "Facebook Message",
"twitterMsg": "Twitter Message",
"pinterestMsg": "Pinterest Message",
Expand Down

0 comments on commit 5a5c4ed

Please sign in to comment.