diff --git a/cooperator_website_recaptcha/README.rst b/cooperator_website_recaptcha/README.rst deleted file mode 100644 index a0f54e705..000000000 --- a/cooperator_website_recaptcha/README.rst +++ /dev/null @@ -1,59 +0,0 @@ -============================= -Cooperators Website Recaptcha -============================= - -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png - :target: https://odoo-community.org/page/development-status - :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Fvertical--cooperative-lightgray.png?logo=github - :target: https://github.com/coopiteasy/vertical-cooperative/tree/12.0/cooperator_website_recaptcha - :alt: coopiteasy/vertical-cooperative - -|badge1| |badge2| |badge3| - -Add Google Recaptcha to Subscription Request Form - -**Table of contents** - -.. contents:: - :local: - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* Coop IT Easy SC - -Contributors -~~~~~~~~~~~~ - -* `Coop IT Easy SC `_: - - * Carmen Bianca Bakker - -Maintainers -~~~~~~~~~~~ - -This module is part of the `coopiteasy/vertical-cooperative `_ project on GitHub. - -You are welcome to contribute. diff --git a/cooperator_website_recaptcha/__init__.py b/cooperator_website_recaptcha/__init__.py deleted file mode 100644 index 91c5580fe..000000000 --- a/cooperator_website_recaptcha/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from . import controllers -from . import models diff --git a/cooperator_website_recaptcha/__manifest__.py b/cooperator_website_recaptcha/__manifest__.py deleted file mode 100644 index 80614455c..000000000 --- a/cooperator_website_recaptcha/__manifest__.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022 Coop IT Easy SC -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -{ - "name": "Cooperators Website Recaptcha", - "summary": """ - Add Google Recaptcha to Subscription Request Form""", - "version": "12.0.1.0.1", - "category": "Cooperative management", - "website": "https://coopiteasy.be", - "author": "Coop IT Easy SC", - "license": "AGPL-3", - "application": False, - "depends": [ - "cooperator_website", - "portal_recaptcha", - ], - "excludes": [], - "data": [ - "views/res_company_views.xml", - "views/subscription_template.xml", - ], - "demo": [], - "qweb": [], -} diff --git a/cooperator_website_recaptcha/controllers/__init__.py b/cooperator_website_recaptcha/controllers/__init__.py deleted file mode 100644 index 12a7e529b..000000000 --- a/cooperator_website_recaptcha/controllers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import main diff --git a/cooperator_website_recaptcha/controllers/main.py b/cooperator_website_recaptcha/controllers/main.py deleted file mode 100644 index 5e048b350..000000000 --- a/cooperator_website_recaptcha/controllers/main.py +++ /dev/null @@ -1,43 +0,0 @@ -from odoo.http import request -from odoo.tools.translate import _ - -from odoo.addons.cooperator_website.controllers.main import WebsiteSubscription - - -class RecaptchaWebsiteSubscription(WebsiteSubscription): - def validation( # noqa: C901 (method too complex) - self, kwargs, logged, values, post_file - ): - result = super().validation(kwargs, logged, values, post_file) - if result is not True: - return result - - redirect = "cooperator_website.becomecooperator" - - is_company = kwargs.get("is_company") == "on" - - # TODO: Use a overloaded function with the captcha implementation - if request.env["res.company"].captcha_type == "google": - if ( - "g-recaptcha-response" not in kwargs - or kwargs["g-recaptcha-response"] == "" - ): - values = self.fill_values(values, is_company, logged) - values.update(kwargs) - values["error_msg"] = _( - "the captcha has not been validated, please fill in the captcha" - ) - - return request.render(redirect, values) - elif not request.env["portal.mixin"].is_captcha_valid( - kwargs["g-recaptcha-response"] - ): - values = self.fill_values(values, is_company, logged) - values.update(kwargs) - values["error_msg"] = _( - "the captcha has not been validated, please fill in the captcha" - ) - - return request.render(redirect, values) - - return True diff --git a/cooperator_website_recaptcha/i18n/cooperator_website_recaptcha.pot b/cooperator_website_recaptcha/i18n/cooperator_website_recaptcha.pot deleted file mode 100644 index 02f6c1a73..000000000 --- a/cooperator_website_recaptcha/i18n/cooperator_website_recaptcha.pot +++ /dev/null @@ -1,42 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * cooperator_website_recaptcha -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: cooperator_website_recaptcha -#: model:ir.model.fields,field_description:cooperator_website_recaptcha.field_res_company__captcha_type -msgid "Captcha type or disabled" -msgstr "" - -#. module: cooperator_website_recaptcha -#: model:ir.model,name:cooperator_website_recaptcha.model_res_company -msgid "Companies" -msgstr "" - -#. module: cooperator_website_recaptcha -#: selection:res.company,captcha_type:0 -msgid "Disabled" -msgstr "" - -#. module: cooperator_website_recaptcha -#: selection:res.company,captcha_type:0 -msgid "Google Recaptcha" -msgstr "" - -#. module: cooperator_website_recaptcha -#: code:addons/cooperator_website_recaptcha/controllers/main.py:27 -#: code:addons/cooperator_website_recaptcha/controllers/main.py:37 -#, python-format -msgid "the captcha has not been validated, please fill in the captcha" -msgstr "" - diff --git a/cooperator_website_recaptcha/models/__init__.py b/cooperator_website_recaptcha/models/__init__.py deleted file mode 100644 index aff44f335..000000000 --- a/cooperator_website_recaptcha/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import res_company diff --git a/cooperator_website_recaptcha/models/res_company.py b/cooperator_website_recaptcha/models/res_company.py deleted file mode 100644 index 355b2297f..000000000 --- a/cooperator_website_recaptcha/models/res_company.py +++ /dev/null @@ -1,11 +0,0 @@ -from odoo import fields, models - - -class ResCompany(models.Model): - _inherit = "res.company" - captcha_type = fields.Selection( - [("none", "Disabled"), ("google", "Google Recaptcha")], - "Captcha type or disabled", - required=True, - default="google", - ) diff --git a/cooperator_website_recaptcha/readme/CONTRIBUTORS.rst b/cooperator_website_recaptcha/readme/CONTRIBUTORS.rst deleted file mode 100644 index d64451edc..000000000 --- a/cooperator_website_recaptcha/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,3 +0,0 @@ -* `Coop IT Easy SC `_: - - * Carmen Bianca Bakker diff --git a/cooperator_website_recaptcha/readme/DESCRIPTION.rst b/cooperator_website_recaptcha/readme/DESCRIPTION.rst deleted file mode 100644 index e2d9bce47..000000000 --- a/cooperator_website_recaptcha/readme/DESCRIPTION.rst +++ /dev/null @@ -1 +0,0 @@ -Add Google Recaptcha to Subscription Request Form diff --git a/cooperator_website_recaptcha/static/description/index.html b/cooperator_website_recaptcha/static/description/index.html deleted file mode 100644 index 23bfa57ea..000000000 --- a/cooperator_website_recaptcha/static/description/index.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - -Cooperators Website Recaptcha - - - -
-

Cooperators Website Recaptcha

- - -

Beta License: AGPL-3 coopiteasy/vertical-cooperative

-

Add Google Recaptcha to Subscription Request Form

-

Table of contents

- -
-

Bug Tracker

-

Bugs are tracked on GitHub Issues. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

-

Do not contact contributors directly about support or help with technical issues.

-
-
-

Credits

-
-

Authors

-
    -
  • Coop IT Easy SC
  • -
-
-
-

Contributors

- -
-
-

Maintainers

-

This module is part of the coopiteasy/vertical-cooperative project on GitHub.

-

You are welcome to contribute.

-
-
-
- - diff --git a/cooperator_website_recaptcha/views/res_company_views.xml b/cooperator_website_recaptcha/views/res_company_views.xml deleted file mode 100644 index 42b81e88c..000000000 --- a/cooperator_website_recaptcha/views/res_company_views.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - res.company.form.captcha - - res.company - - - - - - - diff --git a/cooperator_website_recaptcha/views/subscription_template.xml b/cooperator_website_recaptcha/views/subscription_template.xml deleted file mode 100644 index bb9eac345..000000000 --- a/cooperator_website_recaptcha/views/subscription_template.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/setup/cooperator_website_recaptcha/odoo/addons/cooperator_website_recaptcha b/setup/cooperator_website_recaptcha/odoo/addons/cooperator_website_recaptcha deleted file mode 120000 index 957701f6c..000000000 --- a/setup/cooperator_website_recaptcha/odoo/addons/cooperator_website_recaptcha +++ /dev/null @@ -1 +0,0 @@ -../../../../cooperator_website_recaptcha \ No newline at end of file diff --git a/setup/cooperator_website_recaptcha/setup.py b/setup/cooperator_website_recaptcha/setup.py deleted file mode 100644 index 28c57bb64..000000000 --- a/setup/cooperator_website_recaptcha/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=['setuptools-odoo'], - odoo_addon=True, -)