Fix proposals suggest feature
Now we need one suggest placeholder for each translation. This also fixes invalid usage of id HTML attribute.
This commit is contained in:
committed by
voodoorai2000
parent
bd3bb72370
commit
0f4fcfb20e
@@ -5,7 +5,6 @@
|
||||
<%= render "shared/errors", resource: @proposal %>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_field :title,
|
||||
@@ -13,10 +12,10 @@
|
||||
placeholder: t("proposals.form.proposal_title"),
|
||||
label: t("proposals.form.proposal_title"),
|
||||
data: { js_suggest_result: "js_suggest_result",
|
||||
js_suggest: "#js-suggest",
|
||||
js_suggest: ".js-suggest",
|
||||
js_url: suggest_proposals_path } %>
|
||||
</div>
|
||||
<div id="js-suggest"></div>
|
||||
<div class="js-suggest" data-locale="<%= translations_form.locale %>"></div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.label :summary %>
|
||||
|
||||
@@ -1727,7 +1727,7 @@ describe "Proposals" do
|
||||
fill_in "Proposal title", with: "search"
|
||||
check "proposal_terms_of_service"
|
||||
|
||||
within("div#js-suggest") do
|
||||
within("div.js-suggest") do
|
||||
expect(page).to have_content "You are seeing 5 of 6 proposals containing the term 'search'"
|
||||
end
|
||||
end
|
||||
@@ -1743,7 +1743,7 @@ describe "Proposals" do
|
||||
fill_in "Proposal title", with: "debate"
|
||||
check "proposal_terms_of_service"
|
||||
|
||||
within("div#js-suggest") do
|
||||
within("div.js-suggest") do
|
||||
expect(page).not_to have_content "You are seeing"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user