Hide Community Update code

This commit is contained in:
Inga Kirschnick
2023-06-07 15:13:47 +02:00
parent 15e7fa6dd3
commit b8bcb159a2
12 changed files with 252 additions and 250 deletions

View File

@ -8,7 +8,7 @@
<h1 id="title">{{ title }}</h1>
</div>
<div class="col s12 l4">
{# <div class="col s12 l4">
<h4>Profile Settings</h4>
<p>You can edit your public profile here and share it with other nopaque users.
Tell others about your (scientific) background so they can relate and network with you.
@ -112,7 +112,7 @@
</ul>
</div>
<div class="col s12"></div>
<div class="col s12"></div> #}
<div class="col s12 l4">
<h4>General Settings</h4>
@ -181,7 +181,7 @@
{% block modals %}
{{ super() }}
<div class="modal" id="delete-avatar-modal">
{# <div class="modal" id="delete-avatar-modal">
<div class="modal-content">
<h4>Confirm Avatar deletion</h4>
<p>Do you really want to delete <b>{{ user.username }}</b>s avatar?</p>
@ -190,7 +190,7 @@
<a class="btn modal-close waves-effect waves-light">Cancel</a>
<a class="btn modal-close red waves-effect waves-light" id="delete-avatar">Delete</a>
</div>
</div>
</div> #}
<div class="modal" id="delete-user-modal">
<div class="modal-content">
@ -212,7 +212,7 @@
{% block scripts %}
{{ super() }}
<script>
let avatarPreviewElement = document.querySelector('#update-avatar-form-avatar-preview');
{# let avatarPreviewElement = document.querySelector('#update-avatar-form-avatar-preview');
let avatarUploadElement = document.querySelector('#update-avatar-form-avatar');
avatarUploadElement.addEventListener('change', () => {
@ -227,7 +227,7 @@ document.querySelector('#delete-avatar').addEventListener('click', () => {
avatarPreviewElement.src = {{ url_for('static', filename='images/user_avatar.png')|tojson }};
}
);
});
}); #}
document.querySelector('#delete-user').addEventListener('click', (event) => {
Requests.users.entity.delete({{ user.hashid|tojson }})
@ -251,7 +251,7 @@ for (let collapsibleElement of document.querySelectorAll('.collapsible.no-autoin
}
// #region Profile Privacy settings
let profileIsPublicSwitchElement = document.querySelector('#profile-is-public-switch');
{# let profileIsPublicSwitchElement = document.querySelector('#profile-is-public-switch');
let profilePrivacySettingCheckboxElements = document.querySelectorAll('.profile-privacy-setting-checkbox');
profileIsPublicSwitchElement.addEventListener('change', (event) => {
let newEnabled = profileIsPublicSwitchElement.checked;
@ -276,7 +276,7 @@ for (let profilePrivacySettingCheckboxElement of profilePrivacySettingCheckboxEl
profilePrivacySettingCheckboxElement.checked = !newEnabled;
});
});
}
} #}
// #endregion Profile Privacy settings
</script>
{% endblock scripts %}