Set a default hidden title value on milestones admin form, and avoid showing it to the user
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<%= form_for [:admin, @investment.budget, @investment, @milestone] do |f| %>
|
||||
|
||||
<%= f.text_field :title, maxlength: Budget::Investment::Milestone.title_max_length %>
|
||||
<%= f.hidden_field :title, value: l(Time.current, format: :datetime), maxlength: Budget::Investment::Milestone.title_max_length %>
|
||||
<%= f.text_area :description, rows: 5 %>
|
||||
<%= f.text_field :publication_date,
|
||||
value: @milestone.publication_date.present? ? l(@milestone.publication_date.to_date) : nil,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<% @investment.milestones.each do |milestone| %>
|
||||
<li>
|
||||
<div class="milestone-content">
|
||||
<h3><%= milestone.title %></h3>
|
||||
<% if milestone.publication_date.present? %>
|
||||
<span class="milestone-date">
|
||||
<strong><%= t("budgets.investments.show.milestone_publication_date",
|
||||
|
||||
Reference in New Issue
Block a user