Cambios para hacer commit: modificado: app/assets/javascripts/tag_autocomplete.js.coffee modificado: app/assets/stylesheets/autocomplete_overrides.scss nuevo archivo: app/controllers/tags_controller.rb modificado: app/models/abilities/common.rb modificado: app/views/debates/_form.html.erb modificado: app/views/proposals/_form.html.erb modificado: config/initializers/acts_as_taggable_on.rb modificado: config/routes.rb modificado: spec/lib/acts_as_taggable_on_spec.rb
47 lines
2.0 KiB
Plaintext
47 lines
2.0 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_max_length, placeholder: t("debates.form.debate_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_debates_path}%>
|
|
</div>
|
|
<div id="js-suggest"></div>
|
|
<div class="ckeditor small-12 column">
|
|
<%= f.label :description, t("debates.form.debate_text") %>
|
|
<%= f.cktext_area :description, maxlength: Debate.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
|
|
</div>
|
|
|
|
<%= f.invisible_captcha :subtitle %>
|
|
|
|
<div class="small-12 column">
|
|
<%= f.label :tag_list, t("debates.form.tags_label") %>
|
|
<p class="help-text" id="tag-list-help-text"><%= t("debates.form.tags_instructions") %></p>
|
|
|
|
<%= f.text_field :tag_list, value: @debate.tag_list.to_s,
|
|
label: false,
|
|
placeholder: t("debates.form.tags_placeholder"),
|
|
aria: {describedby: "tag-list-help-text"},
|
|
data: {js_url: suggest_tags_path},
|
|
class: 'tag-autocomplete'%>
|
|
</div>
|
|
<div class="small-12 column">
|
|
<% if @debate.new_record? %>
|
|
<%= f.label :terms_of_service do %>
|
|
<%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %>
|
|
<span class="checkbox">
|
|
<%= t("form.accept_terms",
|
|
policy: link_to(t("form.policy"), "/privacy", target: "blank"),
|
|
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")).html_safe %>
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="actions small-12 column">
|
|
<%= f.submit(class: "button", value: t("debates.#{action_name}.form.submit_button")) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|