<!DOCTYPE html>

<html lang="en">

<head>
<meta charset="UTF-8" />
<title>RStudio Sign In</title>
<link rel="shortcut icon" href="images/favicon.ico" />

<link rel="stylesheet" href="rstudio.css" type="text/css"/>
<link rel="stylesheet" href="signin.css" type="text/css"/>
<link rel="stylesheet" href="zocial/zocial.css" type="text/css"/>

<script type="text/javascript" src="js/signin.js"></script>

<style type="text/css">

.zocial.google.disabled {
  background-color: #a0a2a5;
}

#errorpanel {
  display: #errorDisplay#;
}

</style>

</head>

<body>
<header id="banner">
  <div id="logo">
    #!logoHtml#
  </div>
  <div id="licensed-to">
    <span id="license-prefix">#licensePrefix#</span>
    <span id="licensee">#licensee#</span>
  </div>
</header>
<main>
<div id="errorpanel">
  <p id="errortext">Error: #errorMessage#</p>
</div>
<div role="alert" aria-atomic="true" class="visuallyhidden" id="live-error"></div>


<form name='login_form' action='#action#'
      method='POST' enctype='application/x-www-form-urlencoded'
      onsubmit='return verifyMe();'>

<table role="presentation" id="border" align="center">
  <tr>
    <td>
      <div role="group" aria-labelledby="caption_header">
        <div id="controls">
          <h1 id="caption_header" class="caption">Sign into RStudio with your<br/>Google account</h1>
          <label for="username">Google Email:</label><br />
          <input type='text'
                name='username'
                value=''
                id='username'
                size='45'/><br/>
          <div style="display: #staySignedInDisplay#;">
            <input type="checkbox" name="staySignedIn" id="staySignedIn" checked="1"/>
            <label id="staySignedInLabel" for="staySignedIn">Stay signed in when browser closes</label>
            <p style="display: #authTimeoutMinutesDisplay#;">
              <span style="font-size:10px">You will automatically be signed out after #authTimeoutMinutes# minutes of inactivity.</span>
            </p>
          </div>
          <input type="hidden" name="#csrf_token_meta#" value="#csrf_token#" />
          <input type='hidden' name='appUri' value='#appUri#'/>
          <div class="buttonpanel">
              <button id="signinbutton" class='zocial google'>Sign in with Google</button>
          </div>
        </div>
        <div id="goback" class="signinhidden">
          <h1 class="caption">Signed Out</h1>
          <p role="alert" aria-atomic="true">This browser was signed out from RStudio due to inactivity or by a manual sign out initiated from another tab. A new sign in was detected and you may now return to RStudio using the button below.</p>
          <div class="buttonpanel"><button class="fancy" type="button" onclick="window.location = responseURL;">Return to RStudio</button></div>
        </div>
      </div>
    </td>
  </tr>
</table>
</form>
<div class="signin-spinner-holder">
  <div aria-live="polite" class="visuallyhidden" id="progress-message"></div>
  <div role="progressbar" aria-labelledby="progress-message" id="spinner" class="signin-hidden signin-spinner">
     <div></div><div></div><div></div><div></div>
     <div></div><div></div><div></div><div></div>
     <div></div><div></div><div></div><div></div>
  </div>
</div>

<div id="login-html">
#!loginPageHtml#
</div>
</main>
</body>

</html>
