<!DOCTYPE html>
<html lang="{{.Locale}}">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#fff">
    <title>{{t "Move delegated auth Title"}}</title>
    <link rel="stylesheet" href="{{asset .Domain "/fonts/fonts.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/css/cozy-bs.min.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/styles/theme.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/styles/cirrus.css" .ContextName}}">
    {{.Favicon}}
    <link rel="preload" href="/assets/icons/check.svg" as="image">
  </head>
  <body>
  <body class="theme-inverted">
    <form id="two-factor-form" method="POST" action="/auth/twofactor" class="d-contents">
      <input id="state" type="hidden" name="state" value="{{.State}}" />
      <input id="client_id" type="hidden" name="client_id" value="{{.ClientID}}" />
      <input id="redirect" type="hidden" name="redirect" value="{{.Redirect}}" />
      <input id="two-factor-token" type="hidden" name="two-factor-token" value="{{.TwoFactorToken}}" />
      <main class="wrapper">

        <header class="wrapper-top d-flex flex-row align-items-center">
          <a href="https://cozy.io/" class="btn p-2 d-sm-none">
            <img src="{{asset .Domain "/images/logo-dark.svg"}}" alt="Cozy Cloud" class="logo" />
          </a>
        </header>

        <div class="d-flex flex-column align-items-center">
          <img src="/public/avatar" alt="" class="avatar my-3 border border-primary border-2 rounded-circle" />
          <h1 class="h4 h2-md mb-0 text-center">{{t "Move delegated auth Title"}}</h1>
          <p class="mb-3 text-muted">{{.Domain}}</p>
          <p class="mb-4 mb-md-5 text-center">{{t "Move delegated auth Help" .Email}}</p>
          <div id="two-factor-field" class="form-floating has-validation w-100 mb-3">
            <input type="text" class="form-control form-control-md-lg" id="two-factor-passcode" name="two-factor-passcode" autofocus autocomplete="one-time-code" pattern="[0-9]*" inputmode="numeric" maxlength="6" />
            <label for="two-factor-passcode">{{t "Login Two factor field"}}</label>
            {{if .CredentialsError}}
            <div class="invalid-tooltip mb-1">
              <div class="tooltip-arrow"></div>
              <span class="icon icon-alert bg-danger"></span>
              {{.CredentialsError}}
            </div>
            {{end}}
          </div>
        </div>

        <footer class="w-100">
          <button id="two-factor-submit" class="btn btn-primary btn-md-lg w-100 my-4 mt-md-5" type="submit">
            {{t "Login Confirm"}}
          </button>
        </footer>

      </main>
    </form>
    <script src="{{asset .Domain "/scripts/cirrus.js"}}"></script>
    <script src="{{asset .Domain "/scripts/twofactor.js"}}"></script>
  </body>
</html>
