diff --git a/age_verification_odoo/README.rst b/age_verification_odoo/README.rst new file mode 100644 index 000000000..d88c89f79 --- /dev/null +++ b/age_verification_odoo/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Age Verification in Website Login +================================= +* This module acts as a gate,allowing only users over the specified age range +to access the platform. + +Configuration +============= +* No additional configurations needed + +Company +======= +* `Cybrosys Techno Solutions `__ + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +======= +* Developer: (v16) Saleekha Musthari P, odoo@cybrosys.com + +Contacts +======== +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/age_verification_odoo/__init__.py b/age_verification_odoo/__init__.py new file mode 100644 index 000000000..852d2e6b6 --- /dev/null +++ b/age_verification_odoo/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Saleekha Musthari P() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# diff --git a/age_verification_odoo/__manifest__.py b/age_verification_odoo/__manifest__.py new file mode 100644 index 000000000..96aac0345 --- /dev/null +++ b/age_verification_odoo/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Saleekha Musthari P() +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Age Verification in Website Login', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """This module acts as a gate,allowing only users over the + specified age range to access the platform.""", + 'description': """This module acts as a gate,allowing only users over the + specified age range to access the platform. You can also include a message + for users who are unable to log in due to Odoo Age Verification.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website'], + 'data': [ + 'views/website_layout_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'age_verification_odoo/static/src/css/age_form.css', + 'age_verification_odoo/static/src/js/age_verification.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/age_verification_odoo/doc/RELEASE_NOTES.md b/age_verification_odoo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1dacd017a --- /dev/null +++ b/age_verification_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.05.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Age Verification in Website Login diff --git a/age_verification_odoo/static/description/assets/icons/check.png b/age_verification_odoo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/check.png differ diff --git a/age_verification_odoo/static/description/assets/icons/chevron.png b/age_verification_odoo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/chevron.png differ diff --git a/age_verification_odoo/static/description/assets/icons/cogs.png b/age_verification_odoo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/cogs.png differ diff --git a/age_verification_odoo/static/description/assets/icons/consultation.png b/age_verification_odoo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/consultation.png differ diff --git a/age_verification_odoo/static/description/assets/icons/ecom-black.png b/age_verification_odoo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/education-black.png b/age_verification_odoo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/education-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/hotel-black.png b/age_verification_odoo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/license.png b/age_verification_odoo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/license.png differ diff --git a/age_verification_odoo/static/description/assets/icons/lifebuoy.png b/age_verification_odoo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/age_verification_odoo/static/description/assets/icons/manufacturing-black.png b/age_verification_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/pos-black.png b/age_verification_odoo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/pos-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/puzzle.png b/age_verification_odoo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/puzzle.png differ diff --git a/age_verification_odoo/static/description/assets/icons/restaurant-black.png b/age_verification_odoo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/service-black.png b/age_verification_odoo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/service-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/trading-black.png b/age_verification_odoo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/trading-black.png differ diff --git a/age_verification_odoo/static/description/assets/icons/training.png b/age_verification_odoo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/training.png differ diff --git a/age_verification_odoo/static/description/assets/icons/update.png b/age_verification_odoo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/update.png differ diff --git a/age_verification_odoo/static/description/assets/icons/user.png b/age_verification_odoo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/user.png differ diff --git a/age_verification_odoo/static/description/assets/icons/wrench.png b/age_verification_odoo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/age_verification_odoo/static/description/assets/icons/wrench.png differ diff --git a/age_verification_odoo/static/description/assets/misc/categories.png b/age_verification_odoo/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/categories.png differ diff --git a/age_verification_odoo/static/description/assets/misc/check-box.png b/age_verification_odoo/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/check-box.png differ diff --git a/age_verification_odoo/static/description/assets/misc/compass.png b/age_verification_odoo/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/compass.png differ diff --git a/age_verification_odoo/static/description/assets/misc/corporate.png b/age_verification_odoo/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/corporate.png differ diff --git a/age_verification_odoo/static/description/assets/misc/customer-support.png b/age_verification_odoo/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/customer-support.png differ diff --git a/age_verification_odoo/static/description/assets/misc/cybrosys-logo.png b/age_verification_odoo/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/cybrosys-logo.png differ diff --git a/age_verification_odoo/static/description/assets/misc/features.png b/age_verification_odoo/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/features.png differ diff --git a/age_verification_odoo/static/description/assets/misc/logo.png b/age_verification_odoo/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/logo.png differ diff --git a/age_verification_odoo/static/description/assets/misc/pictures.png b/age_verification_odoo/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/pictures.png differ diff --git a/age_verification_odoo/static/description/assets/misc/pie-chart.png b/age_verification_odoo/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/pie-chart.png differ diff --git a/age_verification_odoo/static/description/assets/misc/right-arrow.png b/age_verification_odoo/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/right-arrow.png differ diff --git a/age_verification_odoo/static/description/assets/misc/star.png b/age_verification_odoo/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/star.png differ diff --git a/age_verification_odoo/static/description/assets/misc/support.png b/age_verification_odoo/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/support.png differ diff --git a/age_verification_odoo/static/description/assets/misc/whatsapp.png b/age_verification_odoo/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/age_verification_odoo/static/description/assets/misc/whatsapp.png differ diff --git a/age_verification_odoo/static/description/assets/modules/1.png b/age_verification_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..2a722d66e Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/1.png differ diff --git a/age_verification_odoo/static/description/assets/modules/2.png b/age_verification_odoo/static/description/assets/modules/2.png new file mode 100644 index 000000000..df65629bf Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/2.png differ diff --git a/age_verification_odoo/static/description/assets/modules/3.jpg b/age_verification_odoo/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..157e5a4d4 Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/3.jpg differ diff --git a/age_verification_odoo/static/description/assets/modules/4.png b/age_verification_odoo/static/description/assets/modules/4.png new file mode 100644 index 000000000..d9374733c Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/4.png differ diff --git a/age_verification_odoo/static/description/assets/modules/5.png b/age_verification_odoo/static/description/assets/modules/5.png new file mode 100644 index 000000000..a78662b18 Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/5.png differ diff --git a/age_verification_odoo/static/description/assets/modules/6.png b/age_verification_odoo/static/description/assets/modules/6.png new file mode 100644 index 000000000..e90228872 Binary files /dev/null and b/age_verification_odoo/static/description/assets/modules/6.png differ diff --git a/age_verification_odoo/static/description/assets/screenshots/1.png b/age_verification_odoo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..bf1c7385b Binary files /dev/null and b/age_verification_odoo/static/description/assets/screenshots/1.png differ diff --git a/age_verification_odoo/static/description/assets/screenshots/2.png b/age_verification_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..abb4e546c Binary files /dev/null and b/age_verification_odoo/static/description/assets/screenshots/2.png differ diff --git a/age_verification_odoo/static/description/assets/screenshots/hero.gif b/age_verification_odoo/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..35ce6eb34 Binary files /dev/null and b/age_verification_odoo/static/description/assets/screenshots/hero.gif differ diff --git a/age_verification_odoo/static/description/assets/screenshots/scrn1.png b/age_verification_odoo/static/description/assets/screenshots/scrn1.png new file mode 100644 index 000000000..00da14022 Binary files /dev/null and b/age_verification_odoo/static/description/assets/screenshots/scrn1.png differ diff --git a/age_verification_odoo/static/description/assets/screenshots/scrn2.png b/age_verification_odoo/static/description/assets/screenshots/scrn2.png new file mode 100644 index 000000000..c88b9fac7 Binary files /dev/null and b/age_verification_odoo/static/description/assets/screenshots/scrn2.png differ diff --git a/age_verification_odoo/static/description/banner.jpg b/age_verification_odoo/static/description/banner.jpg new file mode 100644 index 000000000..a52864ebb Binary files /dev/null and b/age_verification_odoo/static/description/banner.jpg differ diff --git a/age_verification_odoo/static/description/icon.png b/age_verification_odoo/static/description/icon.png new file mode 100644 index 000000000..ef7c238af Binary files /dev/null and b/age_verification_odoo/static/description/icon.png differ diff --git a/age_verification_odoo/static/description/images/checked.png b/age_verification_odoo/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/age_verification_odoo/static/description/images/checked.png differ diff --git a/age_verification_odoo/static/description/images/cybrosys.png b/age_verification_odoo/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/age_verification_odoo/static/description/images/cybrosys.png differ diff --git a/age_verification_odoo/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip b/age_verification_odoo/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip new file mode 100644 index 000000000..54b4beb1f Binary files /dev/null and b/age_verification_odoo/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip differ diff --git a/age_verification_odoo/static/description/images/product_brand_ecommerce.png b/age_verification_odoo/static/description/images/product_brand_ecommerce.png new file mode 100644 index 000000000..2ac89b363 Binary files /dev/null and b/age_verification_odoo/static/description/images/product_brand_ecommerce.png differ diff --git a/age_verification_odoo/static/description/images/scrn1.png b/age_verification_odoo/static/description/images/scrn1.png new file mode 100644 index 000000000..00da14022 Binary files /dev/null and b/age_verification_odoo/static/description/images/scrn1.png differ diff --git a/age_verification_odoo/static/description/images/scrn2.png b/age_verification_odoo/static/description/images/scrn2.png new file mode 100644 index 000000000..c88b9fac7 Binary files /dev/null and b/age_verification_odoo/static/description/images/scrn2.png differ diff --git a/age_verification_odoo/static/description/images/website_featured_products.jpeg b/age_verification_odoo/static/description/images/website_featured_products.jpeg new file mode 100644 index 000000000..9542b3f7a Binary files /dev/null and b/age_verification_odoo/static/description/images/website_featured_products.jpeg differ diff --git a/age_verification_odoo/static/description/images/website_repeat_sale.jpeg b/age_verification_odoo/static/description/images/website_repeat_sale.jpeg new file mode 100644 index 000000000..a749a22d9 Binary files /dev/null and b/age_verification_odoo/static/description/images/website_repeat_sale.jpeg differ diff --git a/age_verification_odoo/static/description/images/website_sale_advanced_search.png b/age_verification_odoo/static/description/images/website_sale_advanced_search.png new file mode 100644 index 000000000..691f06847 Binary files /dev/null and b/age_verification_odoo/static/description/images/website_sale_advanced_search.png differ diff --git a/age_verification_odoo/static/description/images/website_sale_product_quick_view.jpeg b/age_verification_odoo/static/description/images/website_sale_product_quick_view.jpeg new file mode 100644 index 000000000..6fa520659 Binary files /dev/null and b/age_verification_odoo/static/description/images/website_sale_product_quick_view.jpeg differ diff --git a/age_verification_odoo/static/description/index.html b/age_verification_odoo/static/description/index.html new file mode 100644 index 000000000..7a0b05284 --- /dev/null +++ b/age_verification_odoo/static/description/index.html @@ -0,0 +1,609 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

+ Age Verification in Website Login

+

+ This Module Acts as a Gate,Allowing Only Users Over the + Specified Age Range to Access the Platform.

+ + +
+ +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module functions as a gate, permitting only users who fall within + the specified age range to access the platform. It also provides the + option to include a message for users unable to log in due to age + verification within the Website Login process. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Community and Enterprise Support +
+
+ + Allowing Users Over the Specified age range +to access the platform +
+
+ + Access denied messages will be displayed +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Website -> Settings -> choose "Free sigh up"

+ +
+
+

+ Then login and create a new account

+ +
+
+

+ A pop-up window for age verification will appear.

+

+ There will be a pop-up window to confirm your age.

+ +
+
+

+ If a user cannot access the website, a message will be + displayed.

+

+ The user will see a message if they are not permitted to access + the website.

+ +
+
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + +
+
+ +
+

+ Our Services +

+
+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+ +
+

+ Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/age_verification_odoo/static/src/css/age_form.css b/age_verification_odoo/static/src/css/age_form.css new file mode 100644 index 000000000..496a3ee7d --- /dev/null +++ b/age_verification_odoo/static/src/css/age_form.css @@ -0,0 +1,136 @@ +body { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Montserrat', sans-serif; +} +.dialog-box{ + + max-width: 700px; +} +.modal-img { +text-align: center; +} +.verify { + text-align: center; + display: flex; + align-items: center; + justify-content: center; +} +.modal-img img{ +width: 100%; +height: auto; +} +.right-content { + padding: 1rem; + height: 400px; + text-align: center; + display: flex; + flex-direction: column; + justify-content: center; +} +.right-content h2 { + text-align: center; + font-weight: 700; + text-transform: uppercase; + color: #009045; +} +.right-content span{ + font-weight: 600; + margin-bottom: 12px; +} +SELECT { + padding: 5px; + padding-right: 50px; +} +.form-container{ + padding: 0px; +} + .conform-btn{ + margin-top: 40px; + display: flex; + justify-content: center; + } + .year-picker{ + display: flex; + justify-content: space-between; + } + .age-verify .btn{ + padding: 8px 24px; + width: 48%; + } + .btn-submit { + color: #FFFFFF; + background-color: #35979c; + border-color: #35979c; + border-radius: 4px; + margin-bottom: 16px; +} +.btn-submit:hover { + color: #FFFFFF; + background-color: #35979c; + border-color: #35979c; +} +.btn-submit:not(:disabled):not(.disabled).active, .btn-submit:not(:disabled):not(.disabled):active, .show>.btn-submit.dropdown-toggle { + color: #fff; + background-color: #009045 ; + border-color: #009045; +} +.btn-submit:not(:disabled):not(.disabled).active:focus, .btn-submit:not(:disabled):not(.disabled):active:focus, .show>.btn-submit.dropdown-toggle:focus { + box-shadow: 0 0 0 .2rem #00904658; +} +@media(max-width:992px){ + + .modal-img img { + width: 40%; + } +} +@media(max-width:500px){ + SELECT { + padding: 5px; + padding-right: 30px; + } + .terms-condition label { + font-size: 12px; + } + .right-content h2 { + + font-size: 24px; + } + .right-content span { + font-size: 14px; + } + .right-content p{ + font-size: 14px; + } +} +@media(max-width:375px){ + SELECT { + padding: 5px; + padding-right: 12px; + } +} +@media(max-width:285px){ + .terms-condition label { + font-size: 9px; + } +} +.age-verify { + top:0; + position: absolute; + height: 100%; + width: 100%; + background-color: #1e0c0cc7 !important; + z-index: 9999; + overflow: hidden; + padding: 40px; + box-sizing: border-box; + box-shadow: 0 20px 60px rgba(#000,0.2); +} +#start { + width: 250px; + margin-left: 70px; +} +.access_message { + color: #ff0000; +} diff --git a/age_verification_odoo/static/src/image/check-mark.png b/age_verification_odoo/static/src/image/check-mark.png new file mode 100644 index 000000000..6aa84d911 Binary files /dev/null and b/age_verification_odoo/static/src/image/check-mark.png differ diff --git a/age_verification_odoo/static/src/js/age_verification.js b/age_verification_odoo/static/src/js/age_verification.js new file mode 100644 index 000000000..4931e2384 --- /dev/null +++ b/age_verification_odoo/static/src/js/age_verification.js @@ -0,0 +1,43 @@ +odoo.define('age_verification_odoo.verification', function(require) { + "use strict"; + /** + * Age Verification Widget for Odoo Website. + * + * This widget handles the age verification process for users trying to sign up on the Odoo website. + * It displays a modal asking users to confirm their date of birth and checks if the user is at least + * 18 years old. If the user is 18 or older, the sign-up form is enabled; otherwise, an access + * denied message is shown. + */ + var publicWidget = require('web.public.widget'); + publicWidget.registry.age_verification = publicWidget.Widget.extend({ + selector: ".oe_website_login_container", + events: { + 'click #age_confirmed': 'onClickAgeConfirm', + }, + start: function() { + this._super.apply(this, arguments); + this._showAgeVerificationModal(); + }, + _showAgeVerificationModal: function () { + var emailField = $('#signup_form input[name="login"]').val(); + var passwordField = $('#signup_form input[name="password"]').val(); + if (emailField) { + this.$el.find('.age-verify').hide(); + } + }, + onClickAgeConfirm: function(e) { + var date = this.$el.find('#start').val(); + var dob = new Date(date); + var currentDate = new Date(); + var timeDiff = currentDate.getTime() - dob.getTime(); + var age = Math.floor(timeDiff / (1000 * 60 * 60 * 24 * 365.25)); + if (age >= 18) { + this.$el.find('.age-verify').hide(); + this.$el.find('.oe_signup_form :input').prop('disabled', false); + sessionStorage.setItem('ageVerified', true); + } else { + this.$el.find('.access_message').removeClass('d-none'); + } + }, + }); +}); diff --git a/age_verification_odoo/views/website_layout_templates.xml b/age_verification_odoo/views/website_layout_templates.xml new file mode 100644 index 000000000..1b96de6d0 --- /dev/null +++ b/age_verification_odoo/views/website_layout_templates.xml @@ -0,0 +1,51 @@ + + + + +