dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

sessions-gpg-two-factor.gohtml (2242B)


      1 {{ define "content" }}
      2 <div class="container">
      3     <div class="row">
      4         <div class="col-8 offset-2 col-md-8 offset-md-2 col-sm-8 col-lg-6 offset-lg-3 col-xl-6 offset-xl-3">
      5             {{ if .Data.Error }}
      6             <div class="alert alert-danger">{{ .Data.Error }}</div>
      7             {{ end }}
      8             <div class="card mb-3">
      9                 <div class="card-header">
     10                     {{ t "PGP two factor" . }}
     11                 </div>
     12                 <div class="card-body">
     13                     <form method="post" novalidate>
     14                         <input type="hidden" name="csrf" value="{{ .CSRF }}" />
     15                         <input type="hidden" name="formName" value="pgp_2fa" />
     16                         <input type="hidden" name="token" value="{{ .Data.Token }}" />
     17                         <div class="form-group">
     18                             <label for="encrypted_message">{{ t "Please decrypt the following message with your private key and send the required code" . }}</label>
     19                             <input name="encrypted_message" value="{{ .Data.EncryptedMessage }}" type="hidden" />
     20                             <pre class="code-select"><code>{{ .Data.EncryptedMessage }}</code></pre>
     21                         </div>
     22                         <div class="form-group">
     23                             <label for="pgp_code">{{ t "Your decrypted code" . }}</label>
     24                             <input name="pgp_code" id="pgp_code" value="{{ .Data.Code }}" type="text" class="form-control{{ if .Data.ErrorCode }} is-invalid{{ end }}" autocomplete="off" autocorrect="off" autocapitalize="none" autofocus />
     25                             {{ if .Data.ErrorCode }}
     26                                 <div class="invalid-feedback">{{ .Data.ErrorCode }}</div>
     27                             {{ end }}
     28                         </div>
     29                         <div class="form-group">
     30                             <input type="submit" value="{{ t "Continue login" . }}" class="btn btn-primary" />
     31                             <a href="/settings/pgp" class="btn btn-secondary">{{ t "Cancel" . }}</a>
     32                         </div>
     33                     </form>
     34                 </div>
     35             </div>
     36         </div>
     37     </div>
     38 </div>
     39 {{ end }}