Files
nairobi/app/views/topics/_form.html.erb
Javi Martín 3ea9f3cecf Simplify generating form fields with labels
Instead of generating the label and then a field without a label, we can
directly generate a field with a label.
2019-10-05 16:01:58 +02:00

15 lines
458 B
Plaintext

<%= form_for([@community, @topic]) do |f| %>
<%= render "shared/errors", resource: @topic %>
<div class="row">
<div class="small-12 column">
<%= f.text_field :title, label: t("community.topic.form.topic_title") %>
<%= f.text_area :description, label: t("community.topic.form.topic_text"), rows: "5" %>
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
</div>
</div>
<% end %>