]> git.openstreetmap.org Git - rails.git/commitdiff
Use built-in form submit translation keys for oauth client applications
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jun 2019 14:32:52 +0000 (16:32 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jun 2019 17:24:06 +0000 (19:24 +0200)
app/views/oauth_clients/edit.html.erb
app/views/oauth_clients/new.html.erb
config/locales/en.yml

index d6211778babec739bca6d21d0a76beb90cdc3c7f..d696baae3e336b07c21e31020a661319fb953078 100644 (file)
@@ -4,5 +4,5 @@
 
 <%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
   <%= render :partial => "form", :locals => { :f => f } %>
-  <%= submit_tag t ".submit" %>
+  <%= f.submit %>
 <% end %>
index 0a49f48f88150946550cd7c8142181457a5aa08e..d9cc05d0224f9922143e055710f8b75531099f76 100644 (file)
@@ -3,8 +3,8 @@
 <% end %>
 
 <div class='standard-form'>
-  <%= form_for :client_application, :url => { :action => :create } do |f| %>
+  <%= form_for @client_application, :url => { :action => :create } do |f| %>
     <%= render :partial => "form", :locals => { :f => f } %>
-    <%= submit_tag t(".submit") %>
+    <%= f.submit %>
   <% end %>
 </div>
index 71abe1efe7a11eb7463e69f268b358e81884b3b3..c835df967e7c5c8dc8b749ff7f63368a824dc6f8 100644 (file)
@@ -16,6 +16,9 @@ en:
         create: Add Comment
       message:
         create: Send
+      client_application:
+        create: Register
+        update: Edit
       redaction:
         create: Create redaction
         update: Save redaction
@@ -1891,10 +1894,8 @@ en:
   oauth_clients:
     new:
       title: "Register a new application"
-      submit: "Register"
     edit:
       title: "Edit your application"
-      submit: "Edit"
     show:
       title: "OAuth details for %{app_name}"
       key: "Consumer Key:"