<% form_for(url_for(:action => :authorize), :html => {:id => 'oauth_authorize_form'}) do |f| -%>
  <p>Do you wish to allow the service named '<%= @client.name %>' to access this application on your behalf?</p>
  <div>
    <input type="submit" value="Yes" name="authorize" class='primary' />
    <input type="submit" value="No" name="authorize" />
  </div>

  <input type="hidden" name="client_id" id="client_id" value="<%= params[:client_id] %>" />
  <input type="hidden" name="redirect_uri" id="redirect_uri" value="<%= params[:redirect_uri] %>" />
  <input type="hidden" name="response_type" id="response_type" value="<%= params[:response_type] %>" />
  <input type="hidden" name="state" id="state" value="<%= params[:state] %>" />
<% end -%>

<% form_for(url_for(:action => :authorize), :html => {:id => 'oauth_authorize_form'}) do |f| -%>
  <label for="authorize-yes" class="label">Do you wish to allow the service named '<%= @client.name %>' to access this application on your behalf?</label>
  <div>
    <button type="submit" value="Yes" name="authorize" class='primary' id="authorize-yes">Yes</button>
    <button type="submit" value="No" name="authorize" id="authorize-no">No</button>
  </div>

  <input type="hidden" name="client_id" id="client_id" value="<%= params[:client_id] %>" />
  <input type="hidden" name="redirect_uri" id="redirect_uri" value="<%= params[:redirect_uri] %>" />
  <input type="hidden" name="response_type" id="response_type" value="<%= params[:response_type] %>" />
  <input type="hidden" name="state" id="state" value="<%= params[:state] %>" />
<% end -%>

Add HTML IDs and labels on the authorize page.
Add HTML IDs and labels on the authorize page.