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 d621177..d696baa 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 0a49f48..d9cc05d 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 71abe1e..c835df9 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:"