51 lines
1.7 KiB
Plaintext
51 lines
1.7 KiB
Plaintext
<div class="container">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<h1>Génération de clef DKIM</h1>
|
||
<form method="POST" class="mb-3">
|
||
<div class="mb-3">
|
||
<label for="domain" class="form-label">Domaine</label>
|
||
<input type="text" name="domain" class="form-control" value="expediteur.example" />
|
||
</div>
|
||
<div class="mb-3">
|
||
<label for="selector" class="form-label">Sélecteur</label>
|
||
<input type="text" name="selector" class="form-control" value="default" />
|
||
</div>
|
||
<div class="mb-3">
|
||
<label for="key-size" class="form-label">Taille de la clef</label>
|
||
<select class="form-select" id="key-size" name="key-size">
|
||
<option value="1024">1 024 bits</option>
|
||
<option value="2048" selected>2 048 bits</option>
|
||
</select>
|
||
</div>
|
||
<button type="submit" class="btn btn-primary">Générer</button>
|
||
</form>
|
||
|
||
[% IF txt_record %]
|
||
<div class="alert alert-success">
|
||
<p>Clef générée.</p>
|
||
<p>Publiez ensuite la clef publique dans la <a href="[% request.uri_base %]/dns/zone-edit/expediteur.example">zone DNS</a> :</p>
|
||
<div class="card text-bg-success">
|
||
<div class="card-header text-end">
|
||
<button id="copy-button" class="btn btn-light" onClick="copyTxtRR()">Copier</button>
|
||
</div>
|
||
<div class="card-body">
|
||
<pre class="card-text"><code id="txt-record">[% txt_record | html %]</code></pre>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
[% END %]
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<script type="text/javascript">
|
||
function copyTxtRR() {
|
||
navigator.clipboard.writeText($("#txt-record").text());
|
||
$("#copy-button").text("Texte copié");
|
||
}
|
||
</script>
|