From 5982ade0259f9e65d06497d0aeeeb48d604d49fb Mon Sep 17 00:00:00 2001 From: bohung Date: Fri, 18 Nov 2022 20:34:44 +0800 Subject: [PATCH] Fix bug. --- app/views/admin/announcements/_form_link.html.erb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/views/admin/announcements/_form_link.html.erb b/app/views/admin/announcements/_form_link.html.erb index 461a3fc..a0e997a 100644 --- a/app/views/admin/announcements/_form_link.html.erb +++ b/app/views/admin/announcements/_form_link.html.erb @@ -1,6 +1,7 @@
+ <% url_id = "#{f.object_name.gsub(/[\[\]]+/, '_')}url" %> - <%= f.text_field :url, class: "input-large", placeholder: t(:url) %> + <%= f.text_field :url, class: "input-large", placeholder: t(:url), id: url_id %> <% @site_in_use_locales.each_with_index do |locale, i| %> @@ -23,4 +24,14 @@ <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> <% end %> +