<div class='data-container'>
  <h3>Client ID</h3>
  <p class='sub'>This is the Client ID, you should send with each API request.</p>  
  <p class="key"><%= cinstance.application_id %></p>  
</div>

<div class="data-container" id="application_keys">
  <h3>Client Secret</h3>
  <p class='sub'>This the Client Secret used to authenticate requests.</p>
  <p class="key" id="oauth_secret"><%= h cinstance.keys.first %></p>
  <p>
    <% if cinstance.keys.empty? %>
      <%= fancy_button_to 'Create secret', admin_application_keys_path(cinstance),
        :method  => :post,
        :class   => 'create_key' %>
    <% elsif cinstance.service.buyer_key_regenerate_enabled %>
      <%= fancy_button_to("Regenerate", regenerate_admin_application_key_path(:application_id => cinstance.id, :id => cinstance.keys.first), :method => :put, :class => 'delete', :remote => true)%>
    <% end %>
  </p>
</div>

<div class='data-container' id="redirect_url">
  <h3>Redirect URL</h3>
  <p class='sub'>This is your Redirect URL for OAuth.</p>

  <%= semantic_form_for cinstance, :url => admin_application_path(cinstance), :remote => true do |form| %>
    <%= form.inputs do %>
      <%= form.input :redirect_url, :as => :string %>
      <%= form.commit_button "Submit" %>
    <% end %>
  <% end %>
</div>
