Files
nairobi/app/views/admin/proposal_dashboard/actions/_form.html.erb
Juan Salvador Pérez García 7e43206ac0 Fixes #220
Description as well as short description will be optional for proposal
dashboard actions.

Additionally some minor bugfixes have been fixed.
2018-07-17 17:59:12 +02:00

91 lines
2.7 KiB
Plaintext

<%= form_for [:admin, proposal_dashboard_action] do |f| %>
<%= render 'shared/errors' %>
<div class="row">
<div class="small-12 column">
<%= f.label :title %>
<%= f.text_field :title, label: false %>
</div>
</div>
<div class="row">
<div class="small-12 column">
<%= f.label :short_description %>
<%= f.text_field :short_description, label: false %>
</div>
</div>
<div class="row">
<div class="small-12 column">
<%= f.cktext_area :description,
ckeditor: { language: I18n.locale } %>
</div>
</div>
<div class="row">
<div class="small-12 medium-3 column">
<%= f.label :action_type %>
<% ProposalDashboardAction.action_types.keys.each do |action_type_value| %>
<%= f.radio_button :action_type, action_type_value, label: false %>
<%= f.label "action_type_#{action_type_value}", t("admin.proposal_dashboard_actions.action_type.#{action_type_value}") %>
<br>
<% end %>
</div>
</div>
<div class="small-12 column">
<%= f.check_box :request_to_administrators, label: ProposalDashboardAction.human_attribute_name(:request_to_administrators) %>
</div>
<div class="row">
<div class="small-12 medium-4 large-4 column">
<%= f.label :day_offset %>
<%= f.number_field :day_offset, label: false, step: 1, min: 0 %>
<p class="help-text"><%= t('admin.proposal_dashboard_actions.form.day_offset_help_text') %></p>
</div>
<div class="small-12 medium-4 large-4 column">
<%= f.label :required_supports %>
<%= f.number_field :required_supports, label: false, step: 1, min: 0 %>
<p class="help-text"><%= t('admin.proposal_dashboard_actions.form.required_supports_help_text') %></p>
</div>
<div class="small-12 medium-4 large-4 column">
<%= f.label :order %>
<%= f.number_field :order, label: false, step: 1, min: 0 %>
</div>
</div>
<div class="small-12 column">
<%= f.check_box :active, label: ProposalDashboardAction.human_attribute_name(:active) %>
</div>
<div class="small-12 column">
<hr>
</div>
<% if feature?(:allow_attached_documents) %>
<div class="documents small-12 column">
<%= render 'documents/nested_documents', documentable: proposal_dashboard_action, f: f %>
</div>
<% end %>
<div class="small-12 column">
<hr>
</div>
<div class="links small-12 column">
<%= render 'links/nested_links', linkable: proposal_dashboard_action, f: f %>
</div>
<div class="small-12 column">
<hr>
</div>
<div class="row">
<div class="actions small-12 large-3 medium-3 column">
<%= f.submit(class: 'button expanded', value: t('admin.proposal_dashboard_actions.form.submit_button')) %>
</div>
</div>
<% end %>