Files
nairobi/app/components/debates/form_component.html.erb
Javi Martín b162ad512a Remove row and column divs in debate/proposal form
We don't need any row classes anymore because the <body> already has a
maximum width. As for columns, we only have one column in this form, so
we don't need them either. Besides, the form's parent element already
has a padding.
2021-07-13 15:27:13 +02:00

48 lines
1.6 KiB
Plaintext

<%= translatable_form_for(debate, html: { class: "debate-form" }) do |f| %>
<%= render "shared/errors", resource: debate %>
<%= render "shared/globalize_locales", resource: debate %>
<%= f.translatable_fields do |translations_form| %>
<div>
<%= translations_form.text_field :title,
maxlength: Debate.title_max_length,
data: suggest_data(debate) %>
</div>
<div class="js-suggest" data-locale="<%= translations_form.locale %>"></div>
<div>
<%= translations_form.text_area :description,
maxlength: Debate.description_max_length,
class: "html-area" %>
</div>
<% end %>
<%= f.invisible_captcha :subtitle %>
<div>
<%= f.text_field :tag_list, value: debate.tag_list.to_s,
hint: t("debates.form.tags_instructions"),
placeholder: t("debates.form.tags_placeholder"),
data: { js_url: suggest_tags_path },
class: "tag-autocomplete" %>
</div>
<%= render SDG::RelatedListSelectorComponent.new(f) %>
<div>
<% if debate.new_record? %>
<%= f.check_box :terms_of_service,
title: t("form.accept_terms_title"),
label: t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")
) %>
<% end %>
</div>
<div class="actions">
<%= f.submit(class: "button", value: t("debates.#{action_name}.form.submit_button")) %>
</div>
<% end %>