[deploy] Add name to tags component (#6802)

* Add name to tags component

* Remove old form field

* Update Jest snapshots

* Put form field back in

* Remove explicit name from form field

* Add comment explaining keeping tag_list form field

* Typo - faciliate --> facilitate
This commit is contained in:
Alex 2020-04-07 09:50:45 -04:00 committed by GitHub
parent 9dc8d1dc3d
commit cecddf3097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View file

@ -34,6 +34,7 @@ exports[`<ArticleForm /> renders properly 1`] = `
autoComplete="off"
class="articleform__tags"
id="tag-input"
name="classified_listing[tag_list]"
onBlur={[Function]}
onFocus={[Function]}
onInput={[Function]}

View file

@ -19,6 +19,7 @@ exports[`<Tags /> renders properly 1`] = `
autoComplete="off"
class="articleform__tags"
id="tag-input"
name="classified_listing[tag_list]"
onBlur={[Function]}
onFocus={[Function]}
onInput={[Function]}

View file

@ -432,6 +432,7 @@ class Tags extends Component {
return this.textArea;
}}
className={`${classPrefix}__tags`}
name="classified_listing[tag_list]"
placeholder={`${maxTags} tags max, comma separated, no spaces or special characters`}
autoComplete="off"
value={defaultValue}

View file

@ -32,9 +32,14 @@
<summary>Category details/rules</summary>
</details>
</div>
<%# The following tag_list field is overriden by the Tags JS component
from the listingForm. We keep this form field in place to facilitate
SSR. By having the form field loaded on the DOM first with this view,
we prevent the screen from "jumping" once the deferred JS is loaded
and executed. %>
<div class="field">
<%= form.label "tags_list", "Tags" %>
<%= form.text_field "tags_list", placeholder: "8 tags max, comma separated, no spaces or special characters" %>
<%= form.label "tag_list", "Tags" %>
<%= form.text_field "tag_list", placeholder: "8 tags max, comma separated, no spaces or special characters" %>
</div>
<% if @organizations.present? && @organizations.size > 0 %>
<div class="field">