[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:
parent
9dc8d1dc3d
commit
cecddf3097
4 changed files with 10 additions and 2 deletions
|
|
@ -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]}
|
||||
|
|
|
|||
|
|
@ -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]}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue