add: user last_policy_consent
This commit is contained in:
parent
befd9096b1
commit
2edef9bd35
11 changed files with 107 additions and 9 deletions
|
@ -151,7 +151,53 @@
|
|||
}
|
||||
});
|
||||
}"))))))
|
||||
(text "{% elif user.is_deactivated -%}")
|
||||
(text "{% elif user and renew_policy_consent -%}")
|
||||
; renew policy consent
|
||||
(article
|
||||
(main
|
||||
(div
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items_center gap_2")
|
||||
(icon (text "scroll-text"))
|
||||
(text "Our policies have been updated!"))
|
||||
|
||||
(div
|
||||
("class" "card flex flex_col gap_2 no_p_margin")
|
||||
(p (text "Your consent is needed for the updated versions of our Terms of Service and Privacy Policy. Please reread them and click \"Accept\" if you agree to these updated terms."))
|
||||
(ul
|
||||
(li
|
||||
(a
|
||||
("href" "{{ config.policies.terms_of_service }}")
|
||||
(text "Terms of service")))
|
||||
(li
|
||||
(a
|
||||
("href" "{{ config.policies.privacy }}")
|
||||
(text "Privacy policy"))))
|
||||
(hr ("class" "margin"))
|
||||
(button
|
||||
("onclick" "update_policy_consent()")
|
||||
(icon (text "check"))
|
||||
(str (text "general:action.accept")))))))
|
||||
|
||||
(script
|
||||
(text "globalThis.update_policy_consent = async () => {
|
||||
fetch(\"/api/v1/auth/user/me/policy_consent\", {
|
||||
method: \"POST\",
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((res) => {
|
||||
trigger(\"atto::toast\", [
|
||||
res.ok ? \"success\" : \"error\",
|
||||
res.message,
|
||||
]);
|
||||
|
||||
if (res.ok) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
};"))
|
||||
(text "{% elif user and user.is_deactivated -%}")
|
||||
; account deactivated message
|
||||
(article
|
||||
(main
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue