<!DOCTYPE html>
<html>
  <head>
    <title>OAuth 2.0 Request for Permission</title>
    <link rel="shortcut icon" href="/assets/favicon.ico" />
    <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/stylesheets/screen.css">
    <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  </head>
  <body>
  <div class="container">
    <div class="oauth">
      <div class="pull-left">
        <img src="/assets/oauth-2-sm.png">
      </div>
      <div>
        <div>
          <h3>Hi <%= user %>!</h3>
          <small>The app, <strong><%= client.name %></strong>, is requesting access to your account on the
          <strong><%= scope %></strong> database of this xTuple server.</small>
        </div>
      </div>
    </div>
    <div class="panel panel-primary main">
      <div class="panel-body">
      <% if (client.logo && client.logo.length > 0) { %>
        <img src="<%= client.logo %>">
      <% } %>
        <h3>App: <%= client.name %></h3>
        <h4>This app would like:</h4>
        <ul>
        <% for(var i = 0; i < scopes.length; i++) { %>
          <li><%= scopes[i] %></li>
        <% } %>
        </ul>
        <form action="/<%= scope %>/dialog/authorize/decision" method="post">
          <input name="transaction_id" type="hidden" value="<%= transactionID %>">
          <div>
            <div>
              <button
                class="btn btn-info"
                name="submit"
                id="form-fields_loginButton"
                type="submit"
                id="allow">
                Accept
              </button>
              <button
                class="btn btn-info"
                name="submit"
                id="form-fields_loginButton"
                type="submit"
                id="deny">
                Cancel
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  </body>
</html>
