fix: path template & js leave button

This commit is contained in:
Jean-Baptiste Pasquier 2019-10-29 15:15:02 +01:00
parent 7e0653f14b
commit 5adbd98f51
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@
set-user-id-select="user"
)
include hd-user-avatar.pug
include templates/hd-user-avatar.pug
div.content-box__info
sib-link(class="right-btn", next="admin-circle-create") Create a new circle

View File

@ -47,7 +47,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
for(sibForm of document.querySelectorAll('[set-user-id-select]')) {
sibForm.addEventListener('populate', () => {
document.querySelectorAll('sib-form[submit-button^="Join"]').forEach(el=>el.style.display = 'none');
if(document.querySelectorAll('sib-ac-checker:not([hidden]) > sib-delete[data-label="^Leave"]').length == 0) {
if(document.querySelectorAll('sib-ac-checker:not([hidden]) > sib-delete[data-label^="Leave"]').length == 0) {
document.querySelectorAll('sib-form[submit-button^="Join"]').forEach(el=>el.style.display = 'inline-block');
}
// BUG: Populate event trigger before the view is fully loaded! - https://git.happy-dev.fr/startinblox/framework/sib-core/issues/521