diff options
author | Simon Rettberg | 2018-04-25 16:08:50 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-04-25 16:08:50 +0200 |
commit | 4bfa7b7d0c49d2f6a47f0b279122cefac1752194 (patch) | |
tree | c31e14d95bb40d031da330b3ac95748e036a39b3 /modules-available/rebootcontrol | |
parent | [locationinfo] Activate runmode module before calling (diff) | |
download | slx-admin-4bfa7b7d0c49d2f6a47f0b279122cefac1752194.tar.gz slx-admin-4bfa7b7d0c49d2f6a47f0b279122cefac1752194.tar.xz slx-admin-4bfa7b7d0c49d2f6a47f0b279122cefac1752194.zip |
[rebootcontrol] Fix keypair regen feedback
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r-- | modules-available/rebootcontrol/templates/header.html | 20 |
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 |