diff --git a/.gitignore b/.gitignore
index d99f7b6ccb..24df2fd47e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -86,6 +86,6 @@ vue3/.vite
# Configs
vetur.config.js
venv/
-vue3/node_modules
.idea/easy-i18n.xml
cookbook/static/vue3
+vue3/node_modules
diff --git a/cookbook/forms.py b/cookbook/forms.py
index bda48e3dd5..071431a4f0 100644
--- a/cookbook/forms.py
+++ b/cookbook/forms.py
@@ -1,6 +1,8 @@
from datetime import datetime
+
from allauth.account.forms import ResetPasswordForm, SignupForm
+from allauth.socialaccount.forms import SignupForm as SocialSignupForm
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
@@ -14,15 +16,13 @@
class SelectWidget(widgets.Select):
-
class Media:
- js = ('custom/js/form_select.js', )
+ js = ('custom/js/form_select.js',)
class MultiSelectWidget(widgets.SelectMultiple):
-
class Media:
- js = ('custom/js/form_multiselect.js', )
+ js = ('custom/js/form_multiselect.js',)
# Yes there are some stupid browsers that still dont support this but
@@ -139,7 +139,7 @@ class CommentForm(forms.ModelForm):
class Meta:
model = Comment
- fields = ('text', )
+ fields = ('text',)
labels = {'text': _('Add your comment: '), }
widgets = {'text': forms.Textarea(attrs={'rows': 2, 'cols': 15}), }
@@ -161,7 +161,6 @@ class Meta:
help_texts = {'url': _('Leave empty for dropbox and enter only base url for nextcloud (/remote.php/webdav/
is added automatically)'), }
-
class ConnectorConfigForm(forms.ModelForm):
enabled = forms.BooleanField(
help_text="Is the connector enabled",
@@ -315,6 +314,18 @@ def signup(self, request, user):
pass
+class AllAuthSocialSignupForm(SocialSignupForm):
+ terms = forms.BooleanField(label=_('Accept Terms and Privacy'))
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+ if settings.PRIVACY_URL == '' and settings.TERMS_URL == '':
+ self.fields.pop('terms')
+
+ def signup(self, request, user):
+ pass
+
+
class CustomPasswordResetForm(ResetPasswordForm):
captcha = hCaptchaField()
@@ -345,12 +356,13 @@ class Meta:
help_texts = {
'search': _('Select type method of search. Click here for full description of choices.'), 'lookup':
- _('Use fuzzy matching on units, keywords and ingredients when editing and importing recipes.'), 'unaccent':
- _('Fields to search ignoring accents. Selecting this option can improve or degrade search quality depending on language'), 'icontains':
- _("Fields to search for partial matches. (e.g. searching for 'Pie' will return 'pie' and 'piece' and 'soapie')"), 'istartswith':
- _("Fields to search for beginning of word matches. (e.g. searching for 'sa' will return 'salad' and 'sandwich')"), 'trigram':
- _("Fields to 'fuzzy' search. (e.g. searching for 'recpie' will find 'recipe'.) Note: this option will conflict with 'web' and 'raw' methods of search."), 'fulltext':
- _("Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods only function with fulltext fields."),
+ _('Use fuzzy matching on units, keywords and ingredients when editing and importing recipes.'), 'unaccent':
+ _('Fields to search ignoring accents. Selecting this option can improve or degrade search quality depending on language'), 'icontains':
+ _("Fields to search for partial matches. (e.g. searching for 'Pie' will return 'pie' and 'piece' and 'soapie')"), 'istartswith':
+ _("Fields to search for beginning of word matches. (e.g. searching for 'sa' will return 'salad' and 'sandwich')"), 'trigram':
+ _("Fields to 'fuzzy' search. (e.g. searching for 'recpie' will find 'recipe'.) Note: this option will conflict with 'web' and 'raw' methods of search."),
+ 'fulltext':
+ _("Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods only function with fulltext fields."),
}
labels = {
@@ -360,5 +372,5 @@ class Meta:
widgets = {
'search': SelectWidget, 'unaccent': MultiSelectWidget, 'icontains': MultiSelectWidget, 'istartswith': MultiSelectWidget, 'trigram': MultiSelectWidget, 'fulltext':
- MultiSelectWidget,
+ MultiSelectWidget,
}
diff --git a/cookbook/templates/account/signup.html b/cookbook/templates/account/signup.html
index baceb2cb15..fc29ca2b2f 100644
--- a/cookbook/templates/account/signup.html
+++ b/cookbook/templates/account/signup.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
{% load crispy_forms_filters %}
-{% load crispy_forms_filters %}
{% load i18n %}
{% block title %}{% trans 'Register' %}{% endblock %}
diff --git a/cookbook/templates/socialaccount/signup.html b/cookbook/templates/socialaccount/signup.html
index 6779752fa2..79608c1ffd 100644
--- a/cookbook/templates/socialaccount/signup.html
+++ b/cookbook/templates/socialaccount/signup.html
@@ -16,7 +16,6 @@