-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
_form.html.erb
46 lines (39 loc) · 1.88 KB
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<%= form_for(@spending_proposal, url: form_url) do |f| %>
<%= render 'shared/errors', resource: @spending_proposal %>
<div class="row">
<div class="small-12 column">
<%= f.label :title, t("spending_proposals.form.title") %>
<%= f.text_field :title, maxlength: SpendingProposal.title_max_length, placeholder: t("spending_proposals.form.title"), label: false %>
</div>
<div class="ckeditor small-12 column">
<%= f.label :description, t("spending_proposals.form.description") %>
<%= f.cktext_area :description, maxlength: SpendingProposal.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
</div>
<div class="small-12 column">
<%= f.label :external_url, t("spending_proposals.form.external_url") %>
<%= f.text_field :external_url, placeholder: t("spending_proposals.form.external_url"), label: false %>
</div>
<div class="small-12 column">
<%= f.label :geozone_id, t("spending_proposals.form.geozone") %>
<%= f.select :geozone_id, geozone_select_options, {include_blank: t("geozones.none"), label: false} %>
</div>
<div class="small-12 column">
<% if @spending_proposal.new_record? %>
<%= f.label :terms_of_service do %>
<%= f.check_box :terms_of_service, 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="small-12 column">
<%= f.simple_captcha input_html: { required: false } %>
</div>
<div class="actions small-12 column">
<%= f.submit(class: "button radius", value: t("spending_proposals.form.submit_buttons.#{action_name}")) %>
</div>
</div>
<% end %>