Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[website_altcha](website_altcha/) | 18.0.1.0.1 | | Use self hosted privacy friendly captcha for verifying website users are not bots
[website_altcha](website_altcha/) | 18.0.1.1.0 | <a href='https://github.com/hbrunn'><img src='https://github.com/hbrunn.png' width='32' height='32' style='border-radius:50%;' alt='hbrunn'/></a> | Use self hosted privacy friendly captcha for verifying website users are not bots
[website_analytics_matomo](website_analytics_matomo/) | 18.0.1.0.0 | | Track website users using matomo
[website_blog_scheduled_publication](website_blog_scheduled_publication/) | 18.0.1.1.0 | <a href='https://github.com/marcelsavegnago'><img src='https://github.com/marcelsavegnago.png' width='32' height='32' style='border-radius:50%;' alt='marcelsavegnago'/></a> <a href='https://github.com/CristianoMafraJunior'><img src='https://github.com/CristianoMafraJunior.png' width='32' height='32' style='border-radius:50%;' alt='CristianoMafraJunior'/></a> | Schedule blog posts publication date
[website_breadcrumb](website_breadcrumb/) | 18.0.1.0.0 | | Let you have breadcrumbs in website pages
[website_cf_turnstile_login](website_cf_turnstile_login/) | 18.0.1.0.0 | <a href='https://github.com/adasatorres'><img src='https://github.com/adasatorres.png' width='32' height='32' style='border-radius:50%;' alt='adasatorres'/></a> | Add Cloudflare Turnstile captcha to login form
[website_cookiebot](website_cookiebot/) | 18.0.1.0.0 | | Ask for cookies consent connecting with Cookiebot
[website_cookiefirst](website_cookiefirst/) | 18.0.2.0.0 | | Cookiefirst integration
[website_crm_quick_answer](website_crm_quick_answer/) | 18.0.1.0.0 | | Add an automatic answer for contacts asking for info
[website_event_altcha](website_event_altcha/) | 18.0.1.1.0 | <a href='https://github.com/hbrunn'><img src='https://github.com/hbrunn.png' width='32' height='32' style='border-radius:50%;' alt='hbrunn'/></a> | Support event registration with ALTCHA
[website_form_require_legal](website_form_require_legal/) | 18.0.1.0.2 | | Add possibility to require confirm legal terms.
[website_forum_subscription](website_forum_subscription/) | 18.0.1.0.2 | | Adds a button to allow subscription from the website
[website_google_tag_manager](website_google_tag_manager/) | 18.0.1.0.0 | | Add support for Google Tag Manager
Expand Down
3 changes: 2 additions & 1 deletion setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "odoo-addons-oca-website"
version = "18.0.20260901.0"
version = "18.0.20260902.0"
dependencies = [
"odoo-addon-website_altcha==18.0.*",
"odoo-addon-website_analytics_matomo==18.0.*",
Expand All @@ -10,6 +10,7 @@ dependencies = [
"odoo-addon-website_cookiebot==18.0.*",
"odoo-addon-website_cookiefirst==18.0.*",
"odoo-addon-website_crm_quick_answer==18.0.*",
"odoo-addon-website_event_altcha==18.0.*",
"odoo-addon-website_form_require_legal==18.0.*",
"odoo-addon-website_forum_subscription==18.0.*",
"odoo-addon-website_google_tag_manager==18.0.*",
Expand Down
10 changes: 9 additions & 1 deletion website_altcha/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Privacy Friendly Captcha
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47240fe67bd99327829258a0f654f2a147a5332dca76e6e66d67df44800779c8
!! source digest: sha256:83e03d4eacacddd6d9b4c9b29eed8eee8f9d1bde28564186bfb553e8f5a29b6f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -126,6 +126,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-hbrunn| image:: https://github.com/hbrunn.png?size=40px
:target: https://github.com/hbrunn
:alt: hbrunn

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-hbrunn|

This module is part of the `OCA/website <https://github.com/OCA/website/tree/18.0/website_altcha>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
15 changes: 11 additions & 4 deletions website_altcha/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@
"name": "Privacy Friendly Captcha",
"summary": """Use self hosted privacy friendly captcha for
verifying website users are not bots""",
"version": "18.0.1.0.1",
"version": "18.0.1.1.0",
"license": "AGPL-3",
"author": "Dixmit,Odoo Community Association (OCA)",
"maintainers": ["hbrunn"],
"website": "https://github.com/OCA/website",
"depends": [
"website",
],
"assets": {
"web.assets_frontend": [
"website_altcha/static/src/**/*.esm.js",
"website_altcha/static/src/**/*.xml",
"website_altcha/static/src/**/*.scss",
"website_altcha/static/src/*.esm.js",
"website_altcha/static/src/*.xml",
"website_altcha/static/src/*.scss",
],
"web.altcha_libs": [
"website_altcha/static/lib/altcha.js",
"website_altcha/static/lib/altcha-l10n.js",
"website_altcha/static/lib/altcha.css",
],
"web.assets_tests": [
"website_altcha/static/tests/tours/*.esm.js",
],
},
"external_dependencies": {
"python": ["altcha"],
Expand All @@ -31,4 +35,7 @@
"security/ir.model.access.csv",
"views/res_config_settings_views.xml",
],
"demo": [
"demo/website_page.xml",
],
}
36 changes: 36 additions & 0 deletions website_altcha/demo/website_page.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<odoo>
<template id="demo_page_view">
<t t-call="website.layout">
<form class="website_altcha_form">
<p>
This is a demo form for website_altcha. Note how it automatically inserts the widget in the container containing the submit button
</p>
<div>
<button type="submit">Submit</button>
</div>
</form>
<form class="website_altcha_form">
<p>
You can however also place the widget yourself and configure it according to the <a
href="https://altcha.org/docs/v2/widget-integration/#attribute-configuration"
>documentation</a>. In that case the <em
>website_altcha_form</em> class only takes care that the javascript code is loaded and activated.
</p>
<p>
Note in both cases, you'll have to verify the token you received in your custom controller.
</p>
<div>
<altcha-widget type="switch" />
</div>
<div>
<button type="submit">Submit</button>
</div>
</form>
</t>
</template>
<record id="demo_page" model="website.page">
<field name="url">/website_altcha_demo</field>
<field name="is_published" eval="True" />
<field name="view_id" ref="demo_page_view" />
</record>
</odoo>
38 changes: 38 additions & 0 deletions website_altcha/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
". In that case the <em>website_altcha_form</em> class only takes care that "
"the javascript code is loaded and activated."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.res_config_settings_view_form
msgid "Add Altcha functionality"
Expand Down Expand Up @@ -144,6 +151,18 @@ msgstr "Dernière mise à jour par"
msgid "Last Updated on"
msgstr "Dernière mise à jour le"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"Note in both cases, you'll have to verify the token you received in your "
"custom controller."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "Submit"
msgstr ""

#. module: website_altcha
#. odoo-python
#: code:addons/website_altcha/models/ir_http.py:0
Expand All @@ -155,6 +174,13 @@ msgstr "Activité suspecte détectée par Altcha"
msgid "The Altcha key must be unique."
msgstr "La clé Altcha doit être unique."

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"This is a demo form for website_altcha. Note how it automatically inserts "
"the widget in the container containing the submit button"
msgstr ""

#. module: website_altcha
#: model:ir.model.fields,help:website_altcha.field_res_config_settings__altcha_timeout
#: model:ir.model.fields,help:website_altcha.field_website__altcha_timeout
Expand All @@ -177,3 +203,15 @@ msgstr "Utilisé"
#: model:ir.model,name:website_altcha.model_website
msgid "Website"
msgstr "Site web"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"You can however also place the widget yourself and configure it according to "
"the"
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "documentation"
msgstr ""
38 changes: 38 additions & 0 deletions website_altcha/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
". In that case the <em>website_altcha_form</em> class only takes care that "
"the javascript code is loaded and activated."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.res_config_settings_view_form
msgid "Add Altcha functionality"
Expand Down Expand Up @@ -144,6 +151,18 @@ msgstr "Ultimo aggiornamento di"
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"Note in both cases, you'll have to verify the token you received in your "
"custom controller."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "Submit"
msgstr ""

#. module: website_altcha
#. odoo-python
#: code:addons/website_altcha/models/ir_http.py:0
Expand All @@ -155,6 +174,13 @@ msgstr "Attività sospetta rilevata da Altcha"
msgid "The Altcha key must be unique."
msgstr "La chiave Altcha deve essere univoca."

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"This is a demo form for website_altcha. Note how it automatically inserts "
"the widget in the container containing the submit button"
msgstr ""

#. module: website_altcha
#: model:ir.model.fields,help:website_altcha.field_res_config_settings__altcha_timeout
#: model:ir.model.fields,help:website_altcha.field_website__altcha_timeout
Expand All @@ -176,3 +202,15 @@ msgstr "Usata"
#: model:ir.model,name:website_altcha.model_website
msgid "Website"
msgstr "Sito web"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"You can however also place the widget yourself and configure it according to "
"the"
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "documentation"
msgstr ""
38 changes: 38 additions & 0 deletions website_altcha/i18n/website_altcha.pot
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
". In that case the <em>website_altcha_form</em> class only takes care that "
"the javascript code is loaded and activated."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.res_config_settings_view_form
msgid "Add Altcha functionality"
Expand Down Expand Up @@ -138,6 +145,18 @@ msgstr ""
msgid "Last Updated on"
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"Note in both cases, you'll have to verify the token you received in your "
"custom controller."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "Submit"
msgstr ""

#. module: website_altcha
#. odoo-python
#: code:addons/website_altcha/models/ir_http.py:0
Expand All @@ -149,6 +168,13 @@ msgstr ""
msgid "The Altcha key must be unique."
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"This is a demo form for website_altcha. Note how it automatically inserts "
"the widget in the container containing the submit button"
msgstr ""

#. module: website_altcha
#: model:ir.model.fields,help:website_altcha.field_res_config_settings__altcha_timeout
#: model:ir.model.fields,help:website_altcha.field_website__altcha_timeout
Expand All @@ -169,3 +195,15 @@ msgstr ""
#: model:ir.model,name:website_altcha.model_website
msgid "Website"
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid ""
"You can however also place the widget yourself and configure it according to"
" the"
msgstr ""

#. module: website_altcha
#: model_terms:ir.ui.view,arch_db:website_altcha.demo_page_view
msgid "documentation"
msgstr ""
4 changes: 3 additions & 1 deletion website_altcha/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Privacy Friendly Captcha</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47240fe67bd99327829258a0f654f2a147a5332dca76e6e66d67df44800779c8
!! source digest: sha256:83e03d4eacacddd6d9b4c9b29eed8eee8f9d1bde28564186bfb553e8f5a29b6f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/website/tree/18.0/website_altcha"><img alt="OCA/website" src="https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/website-18-0/website-18-0-website_altcha"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/website&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to use a Captcha System completly handled by Odoo.</p>
Expand Down Expand Up @@ -470,6 +470,8 @@ <h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/hbrunn"><img alt="hbrunn" src="https://github.com/hbrunn.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/website/tree/18.0/website_altcha">OCA/website</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
Expand Down
1 change: 0 additions & 1 deletion website_altcha/static/lib/altcha.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* @odoo-module */
const DEV = false;
var is_array = Array.isArray;
var index_of = Array.prototype.indexOf;
Expand Down
49 changes: 49 additions & 0 deletions website_altcha/static/src/altcha.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {loadBundle} from "@web/core/assets";
import {renderToString} from "@web/core/utils/render";
import {session} from "@web/session";

export const AltchaBaseFunctionality = {
altcha_prepend_to: "div.oe_login_buttons",
altcha_enabled: false,

altcha_init() {
this.altcha_enabled = Boolean(session.altcha_public_key);
},

/**
* Loads the altcha libraries.
*
* @returns {Promise|Boolean} promise if libs are loading else false if the altcha key is empty.
*/
async altcha_load_libs() {
if (this.altcha_enabled) {
this._altchaReady = loadBundle(`web.altcha_libs`);
return this._altchaReady;
}
return false;
},
altcha_insert_widget() {
if (this.altcha_enabled && !this.$el.find("altcha-widget").length) {
this.$el
.find(this.altcha_prepend_to)
.prepend(renderToString("website_altcha.AltchaWidget", {}));
}
},
};

export const AltchaLegacyClassFunctionality = {
...AltchaBaseFunctionality,
init() {
this._super(...arguments);
this.altcha_init();
},

async willStart() {
this.altcha_load_libs();
return this._super(...arguments);
},
start() {
this.altcha_insert_widget();
return this._super(...arguments);
},
};
Loading