Using the block syntax to generate the label with a <span> tag inside isn't necessary after upgrading foundation_rails_helpers. Before the upgrade, we couldn't do so because the <span> tag was escaped.
93 lines
3.1 KiB
Plaintext
93 lines
3.1 KiB
Plaintext
<% budget = investment.budget %>
|
|
<%= form_for(investment, url: valuate_valuation_budget_budget_investment_path(budget, investment), html: { id: "valuation_budget_investment_edit_form" }) do |f| %>
|
|
<%= render "shared/errors", resource: investment %>
|
|
<div class="row">
|
|
<div class="small-12 column">
|
|
<fieldset class="fieldset">
|
|
<legend><%= t("valuation.budget_investments.edit.feasibility") %></legend>
|
|
<div class="small-4 column">
|
|
<span class="radio">
|
|
<%= f.radio_button :feasibility, "undecided",
|
|
label: t("valuation.budget_investments.edit.undefined_feasible") %>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="small-4 column">
|
|
<span class="radio">
|
|
<%= f.radio_button :feasibility, "feasible",
|
|
label: t("valuation.budget_investments.edit.feasible") %>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="small-4 column">
|
|
<span class="radio">
|
|
<%= f.radio_button :feasibility, "unfeasible",
|
|
label: t("valuation.budget_investments.edit.unfeasible") %>
|
|
</span>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="unfeasible_fields">
|
|
|
|
<div class="row">
|
|
<div class="small-12 column">
|
|
<%= f.text_area :unfeasibility_explanation,
|
|
label: t("valuation.budget_investments.edit.feasible_explanation_html"),
|
|
rows: 3 %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="feasible_fields">
|
|
|
|
<div class="row">
|
|
<div class="small-12 medium-6 column">
|
|
<%= f.number_field :price,
|
|
label: t("valuation.budget_investments.edit.price_html", currency: budget.currency_symbol),
|
|
max: 1000000000000000 %>
|
|
</div>
|
|
|
|
<div class="small-12 medium-6 column end">
|
|
<%= f.number_field :price_first_year,
|
|
label: t("valuation.budget_investments.edit.price_first_year_html", currency: budget.currency_symbol),
|
|
max: 1000000000000000 %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="small-12 column">
|
|
<%= f.text_area :price_explanation,
|
|
label: t("valuation.budget_investments.edit.price_explanation_html"),
|
|
rows: 3 %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="small-12 medium-6 column">
|
|
<%= f.text_field :duration, label: t("valuation.budget_investments.edit.duration_html") %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="small-12 medium-8 column">
|
|
<%= f.check_box :valuation_finished,
|
|
label: t("valuation.budget_investments.edit.valuation_finished"),
|
|
label_options: { for: "js-investment-report-alert" },
|
|
id: "js-investment-report-alert",
|
|
"data-alert": t("valuation.budget_investments.edit.valuation_finished_alert"),
|
|
"data-not-feasible-alert": t("valuation.budget_investments.edit.not_feasible_alert") %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="actions small-12 medium-4 column">
|
|
<%= f.submit(class: "button expanded large", value: t("valuation.budget_investments.edit.save")) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|