mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update with click handler, genPassword()
This commit is contained in:
parent
6c01069f67
commit
f63c4688bc
@ -143,6 +143,16 @@ $(document).on("submit", ".js-dhcp-settings-form", function(e) {
|
|||||||
$(".js-add-dhcp-static-lease").trigger("click");
|
$(".js-add-dhcp-static-lease").trigger("click");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#gen_wpa_passphrase", function(e) {
|
||||||
|
$('#txtwpapassphrase').val(genPassword(63));
|
||||||
|
});
|
||||||
|
|
||||||
|
function genPassword(pwdLen) {
|
||||||
|
var pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
var rndPass = Array(pwdLen).fill(pwdChars).map(function(x) { return x[Math.floor(Math.random() * x.length)] }).join('');
|
||||||
|
return rndPass;
|
||||||
|
}
|
||||||
|
|
||||||
function setupBtns() {
|
function setupBtns() {
|
||||||
$('#btnSummaryRefresh').click(function(){getAllInterfaces();});
|
$('#btnSummaryRefresh').click(function(){getAllInterfaces();});
|
||||||
$('.intsave').click(function(){
|
$('.intsave').click(function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user