From: Anton Khorev Date: Sat, 1 Jun 2024 06:05:19 +0000 (+0300) Subject: Write closed note controls using submit_tag X-Git-Tag: live~440^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1b1d8326d88bdb4434fc5b12f9f9ff85cd3b961d?ds=inline Write closed note controls using submit_tag --- diff --git a/app/views/notes/show.html.erb b/app/views/notes/show.html.erb index a04cbf9d9..17a6651cf 100644 --- a/app/views/notes/show.html.erb +++ b/app/views/notes/show.html.erb @@ -79,10 +79,14 @@
<% if @note.status != "hidden" and current_user and current_user.moderator? -%> - " class="btn btn-light" data-method="DELETE" data-url="<%= api_note_url(@note, "json") %>"> + <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-light", + :data => { :method => "DELETE", + :url => api_note_url(@note, "json") } %> <% end -%> <% if current_user -%> - " class="btn btn-primary" data-method="POST" data-url="<%= reopen_api_note_url(@note, "json") %>"> + <%= submit_tag t(".reactivate"), :name => "reopen", :class => "btn btn-primary", + :data => { :method => "POST", + :url => reopen_api_note_url(@note, "json") } %> <% end -%>