Simplify date fields in admin banners form
I forgot to merge this change into commit fc9a87a8, so here it goes.
This commit is contained in:
@@ -5,17 +5,11 @@
|
||||
<%= render "shared/errors", resource: @banner %>
|
||||
|
||||
<div class="row">
|
||||
<% date_started_at = @banner.post_started_at.present? ? I18n.localize(@banner.post_started_at) : "" %>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.date_field :post_started_at,
|
||||
value: date_started_at,
|
||||
id: "post_started_at" %>
|
||||
<%= f.date_field :post_started_at, id: "post_started_at" %>
|
||||
</div>
|
||||
<% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : "" %>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= f.date_field :post_ended_at,
|
||||
value: date_ended_at,
|
||||
id: "post_ended_at" %>
|
||||
<%= f.date_field :post_ended_at, id: "post_ended_at" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user