From 7b203e36365d1bd7fc811bb6c1d073573d5e6c5c Mon Sep 17 00:00:00 2001 From: Movilla Date: Fri, 20 Apr 2012 16:07:31 +0200 Subject: [PATCH] Better fix issue #3134 --- app/controllers/authorizations_controller.rb | 2 +- app/views/authorizations/new.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/authorizations_controller.rb b/app/controllers/authorizations_controller.rb index 4b6cb27fe..a10ed326d 100644 --- a/app/controllers/authorizations_controller.rb +++ b/app/controllers/authorizations_controller.rb @@ -36,7 +36,7 @@ class AuthorizationsController < ApplicationController end def create - if params[:commit] == t('authorizations.new.autorize') + if params['confirm'] grant_authorization_code(current_user) else deny_authorization_code diff --git a/app/views/authorizations/new.html.haml b/app/views/authorizations/new.html.haml index 431eb834b..d32759e14 100644 --- a/app/views/authorizations/new.html.haml +++ b/app/views/authorizations/new.html.haml @@ -38,5 +38,5 @@ :url => oauth_authorize_path(params.slice(:redirect_uri, :client_id, :client_secret)) do |form| %br %p - = form.submit "Fuck Yeah!", :value => t('.authorize'), :class => 'button' - = form.submit "Hell No.", :value => t('.nope'), :class => 'button' + = form.submit "Fuck Yeah!", :value => t('.authorize'), :class => 'button', :name => "confirm" + = form.submit "Hell No.", :value => t('.nope'), :class => 'button', :name => "cancel"