Merge pull request #626 from ehuggett/623-password-field
Partial fix for #623
This commit is contained in:
commit
360697c034
1 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@ module.exports = function(state, emit) {
|
||||||
const div = html`
|
const div = html`
|
||||||
<div class="selectPassword">
|
<div class="selectPassword">
|
||||||
<div id="addPasswordWrapper">
|
<div id="addPasswordWrapper">
|
||||||
<input id="addPassword" type="checkbox" onchange=${togglePasswordInput}/>
|
<input id="addPassword" type="checkbox" autocomplete="off" onchange=${togglePasswordInput}/>
|
||||||
<label for="addPassword">
|
<label for="addPassword">
|
||||||
${state.translate('requirePasswordCheckbox')}</label>
|
${state.translate('requirePasswordCheckbox')}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,9 @@ module.exports = function(state, emit) {
|
||||||
function togglePasswordInput(e) {
|
function togglePasswordInput(e) {
|
||||||
const unlockInput = document.getElementById('unlock-input');
|
const unlockInput = document.getElementById('unlock-input');
|
||||||
const boxChecked = e.target.checked;
|
const boxChecked = e.target.checked;
|
||||||
document.querySelector('.setPassword').classList.toggle('hidden');
|
document
|
||||||
|
.querySelector('.setPassword')
|
||||||
|
.classList.toggle('hidden', !boxChecked);
|
||||||
document
|
document
|
||||||
.getElementById('copy')
|
.getElementById('copy')
|
||||||
.classList.toggle('wait-password', boxChecked);
|
.classList.toggle('wait-password', boxChecked);
|
||||||
|
|
Loading…
Reference in a new issue