Merge pull request #626 from ehuggett/623-password-field

Partial fix for #623
This commit is contained in:
Danny Coates 2017-11-02 11:02:58 -07:00 committed by GitHub
commit 360697c034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module.exports = function(state, emit) {
const div = html`
<div class="selectPassword">
<div id="addPasswordWrapper">
<input id="addPassword" type="checkbox" onchange=${togglePasswordInput}/>
<input id="addPassword" type="checkbox" autocomplete="off" onchange=${togglePasswordInput}/>
<label for="addPassword">
${state.translate('requirePasswordCheckbox')}</label>
</div>
@ -24,7 +24,9 @@ module.exports = function(state, emit) {
function togglePasswordInput(e) {
const unlockInput = document.getElementById('unlock-input');
const boxChecked = e.target.checked;
document.querySelector('.setPassword').classList.toggle('hidden');
document
.querySelector('.setPassword')
.classList.toggle('hidden', !boxChecked);
document
.getElementById('copy')
.classList.toggle('wait-password', boxChecked);