fix display of blank emails and naming of fields

the input areas in the user email menu were incorrectly identified by
the email address, which caused duplicate ids on blank fields, and
probably stopped any changes from being applied.
pull/20/head
Harvey Tindall 4 years ago
parent d12335bb4a
commit 086fd0ef2f
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -740,10 +740,10 @@ document.getElementById('openUsers').onclick = function () {
address.setAttribute('type', 'email');
address.readOnly = true;
address.classList.add('form-control-plaintext', 'text-muted', 'd-inline-block', 'addressText');
address.id = 'address_' + user['email'];
address.id = 'address_' + user['name'];
address.setAttribute('style', 'width: auto; margin-left: 2%;');
if (typeof(user['email']) != 'undefined') {
address.value = user['email'];
address.setAttribute('style', 'width: auto; margin-left: 2%;');
}
let editButton = document.createElement('i');
editButton.classList.add('fa', 'fa-edit', 'd-inline-block', 'icon-button');

Loading…
Cancel
Save