summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules-available/rebootcontrol/templates/header.html20
1 files changed, 18 insertions, 2 deletions
diff --git a/modules-available/rebootcontrol/templates/header.html b/modules-available/rebootcontrol/templates/header.html
index b84cb426..e171ccd6 100644
--- a/modules-available/rebootcontrol/templates/header.html
+++ b/modules-available/rebootcontrol/templates/header.html
@@ -41,11 +41,14 @@
</div>
<div class="modal-body">
<p>{{lang_pubKey}}</p>
- <pre>{{pubKey}}</pre>
+ <pre id="pubkey">{{pubKey}}</pre>
<p>{{lang_newKeypairExplanation}}</p>
</div>
<div class="modal-footer">
- <button {{perms.newkeypair.disabled}} class="btn btn-danger pull-right" onclick="generateNewKeypair()" type="button"><span class="glyphicon glyphicon-refresh"></span> {{lang_genNew}}</button>
+ <button {{perms.newkeypair.disabled}} class="btn btn-danger pull-right" onclick="generateNewKeypair()" type="button">
+ <span class="glyphicon glyphicon-refresh"></span>
+ {{lang_genNew}}
+ </button>
</div>
</div>
</div>
@@ -60,4 +63,17 @@
window.location.replace("?do=rebootcontrol&location="+location);
}
+ function generateNewKeypair() {
+ if (!confirm('{{lang_confirmNewKeypair}}'))
+ return;
+ $.ajax({
+ url: '?do=rebootcontrol',
+ type: 'POST',
+ data: { action: "generateNewKeypair", token: TOKEN },
+ success: function(value) {
+ $('#pubkey').text(value);
+ }
+ });
+ }
+
</script> \ No newline at end of file