dkforest

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

age_code.gohtml (2263B)


      1 {{ define "navbar" }} {{ end }}
      2 
      3 {{ define "content" }}
      4 
      5 <div class="container">
      6     <div class="row">
      7         <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">
      8             {{ if .Data.Error }}
      9                 <div class="alert alert-danger">{{ .Data.Error }}</div>
     10             {{ end }}
     11             <div class="card mb-3">
     12                 <div class="card-header">
     13                     {{ t "Age public key (step 2)" . }}
     14                 </div>
     15                 <div class="card-body">
     16                     <form method="post" novalidate>
     17                         <input type="hidden" name="csrf" value="{{ .CSRF }}" />
     18                         <input type="hidden" name="age_public_key" value="{{ .Data.AgePublicKey }}" />
     19                         <input type="hidden" name="formName" value="age_step2" />
     20                         <div class="form-group">
     21                             <label for="encrypted_message">{{ t "Please decrypt the following message with your private key and send the required code" . }}</label>
     22                             <input name="encrypted_message" value="{{ .Data.EncryptedMessage }}" type="hidden" />
     23                             <pre class="code-select"><code>{{ .Data.EncryptedMessage }}</code></pre>
     24                         </div>
     25                         <div class="form-group">
     26                             <label for="age_code">{{ t "Your decrypted code" . }}</label>
     27                             <input name="age_code" id="age_code" value="{{ .Data.Code }}" type="text" class="form-control{{ if .Data.ErrorCode }} is-invalid{{ end }}" autofocus />
     28                             {{ if .Data.ErrorCode }}
     29                                 <div class="invalid-feedback">{{ .Data.ErrorCode }}</div>
     30                             {{ end }}
     31                         </div>
     32                         <div class="form-group">
     33                             <input type="submit" value="{{ t "Validate Age public key" . }}" class="btn btn-primary" />
     34                             <a href="/settings/age" class="btn btn-secondary">{{ t "Cancel" . }}</a>
     35                         </div>
     36                     </form>
     37                 </div>
     38             </div>
     39         </div>
     40     </div>
     41 </div>
     42 
     43 {{ end }}