mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 10:54:18 +00:00
checking terms of use confirmation update
This commit is contained in:
parent
e67dc49976
commit
8dd3669af4
@ -15,10 +15,3 @@ Requests.users.entity.settings.profilePrivacy.update = (userId, profilePrivacySe
|
|||||||
return Requests.JSONfetch(input, init);
|
return Requests.JSONfetch(input, init);
|
||||||
};
|
};
|
||||||
|
|
||||||
Requests.users.entity.settings.acceptTermsOfUse = () => {
|
|
||||||
let input = `/users/accept-terms-of-use`;
|
|
||||||
let init = {
|
|
||||||
method: 'POST'
|
|
||||||
};
|
|
||||||
return Requests.JSONfetch(input, init);
|
|
||||||
};
|
|
||||||
|
@ -14,6 +14,15 @@ Requests.users.entity.delete = (userId) => {
|
|||||||
return Requests.JSONfetch(input, init);
|
return Requests.JSONfetch(input, init);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Requests.users.entity.acceptTermsOfUse = () => {
|
||||||
|
let input = `/users/accept-terms-of-use`;
|
||||||
|
let init = {
|
||||||
|
method: 'POST'
|
||||||
|
};
|
||||||
|
return Requests.JSONfetch(input, init);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
Requests.users.entity.avatar = {};
|
Requests.users.entity.avatar = {};
|
||||||
|
|
||||||
Requests.users.entity.avatar.delete = (userId) => {
|
Requests.users.entity.avatar.delete = (userId) => {
|
||||||
@ -23,3 +32,4 @@ Requests.users.entity.avatar.delete = (userId) => {
|
|||||||
};
|
};
|
||||||
return Requests.JSONfetch(input, init);
|
return Requests.JSONfetch(input, init);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,14 +115,12 @@
|
|||||||
{
|
{
|
||||||
dismissible: false,
|
dismissible: false,
|
||||||
onCloseEnd: () => {
|
onCloseEnd: () => {
|
||||||
Requests.users.entity.settings.acceptTermsOfUse();
|
Requests.users.entity.acceptTermsOfUse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
||||||
{% if not current_user.terms_of_use_accepted %}
|
|
||||||
termsOfUseModal.M_Modal.open();
|
termsOfUseModal.M_Modal.open();
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -38,7 +38,9 @@
|
|||||||
{# {% if current_user.is_authenticated %}
|
{# {% if current_user.is_authenticated %}
|
||||||
{% include "_roadmap.html.j2" %}
|
{% include "_roadmap.html.j2" %}
|
||||||
{% endif %} #}
|
{% endif %} #}
|
||||||
{% include "_terms_of_use_modal.html.j2" %}
|
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
||||||
|
{% include "_terms_of_use_modal.html.j2" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock modals %}
|
{% endblock modals %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock main %}
|
{% endblock main %}
|
||||||
|
Loading…
Reference in New Issue
Block a user