From 2d659b4113085eb732e03f8d772c30299c032919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 28 Aug 2020 14:38:32 +0200 Subject: [PATCH] Simplify date fields in admin banners form I forgot to merge this change into commit fc9a87a8, so here it goes. --- app/views/admin/banners/_form.html.erb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/views/admin/banners/_form.html.erb b/app/views/admin/banners/_form.html.erb index 9d9022b7b..844d3888a 100644 --- a/app/views/admin/banners/_form.html.erb +++ b/app/views/admin/banners/_form.html.erb @@ -5,17 +5,11 @@ <%= render "shared/errors", resource: @banner %>
- <% date_started_at = @banner.post_started_at.present? ? I18n.localize(@banner.post_started_at) : "" %>
- <%= f.date_field :post_started_at, - value: date_started_at, - id: "post_started_at" %> + <%= f.date_field :post_started_at, id: "post_started_at" %>
- <% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : "" %>
- <%= f.date_field :post_ended_at, - value: date_ended_at, - id: "post_ended_at" %> + <%= f.date_field :post_ended_at, id: "post_ended_at" %>