Files
grecia/app/views/debates/_form.html.erb
Alberto Garcia Cabeza f20192d9d7 Improves styles for debates
2015-09-03 14:15:45 +02:00

41 lines
1.4 KiB
Plaintext

<%= form_for(@debate) do |f| %>
<%= render 'shared/errors', resource: @debate %>
<div class="row">
<div class="small-12 column">
<%= f.label :title, t("debates.form.debate_title") %>
<%= f.text_field :title, maxlength: Debate::TITLE_LENGTH, placeholder: t("debates.form.debate_title"), label: false %>
</div>
<div class="ckeditor small-12 column">
<%= f.label :description, t("debates.form.debate_text") %>
<%= f.cktext_area :description, ckeditor: { language: I18n.locale }, label: false %>
</div>
<div class="small-12 column">
<%= f.label :tag_list, t("debates.form.tags_label") %>
<span class="note"><%= t("debates.form.tags_instructions") %></span>
<span class="tags">
<% @featured_tags.each do |tag| %>
<a class="js-add-tag-link"><%= tag.name %></a>
<% end %>
</span>
<%= f.text_field :tag_list, value: @debate.tag_list.to_s, label: false %>
</div>
<div class="small-12 column">
<% if @debate.new_record? %>
<%= f.check_box :terms_of_service, label: t("form.accept_terms") %>
<% end %>
</div>
<div class="small-12 column">
<%= f.simple_captcha input_html: { required: false } %>
</div>
<div class="actions small-12 column">
<%= f.submit(class: "button radius", value: t("debates.#{action_name}.form.submit_button")) %>
</div>
</div>
<% end %>