p_generator disable button
This commit is contained in:
1 parent
12fefb5939
commit
95193bc3f3
1 file changed
+11
-1
@@ -11,7 +11,7 @@ block content
|
||||
span.input-group-text(id='') Device Id
|
||||
input.form-control(type='text',id="in-id")
|
||||
.input-group-append
|
||||
button.btn.btn-outline-secondary(type="button", onclick="clickme()") Get Keys
|
||||
button#getkeybtn.btn.btn-outline-secondary.disabled(type="button", onclick="clickme()") Get Keys
|
||||
|
||||
.row.mt-3
|
||||
.col
|
||||
@@ -50,4 +50,14 @@ block content
|
||||
pTable.classList.add("d-none");
|
||||
}
|
||||
}
|
||||
var inField = document.getElementById("in-id");
|
||||
inField.addEventListener("input", inFieldController);
|
||||
function inFieldController(){
|
||||
var getKeysBtn = document.getElementById("getkeybtn");
|
||||
if(inField.value.length == 24){
|
||||
getKeysBtn.classList.remove("disabled");
|
||||
}else{
|
||||
getKeysBtn.classList.add("disabled");
|
||||
}
|
||||
}
|
||||
script(src='/js/pGenerator.js')
|
||||
Reference in new issue
Block a user