mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
Merge pull request #2224 from bookwyrm-social/email-not-found-text
Remove error reporting on resend to invalid email address
This commit is contained in:
commit
aa579605e0
2 changed files with 4 additions and 12 deletions
|
@ -19,16 +19,8 @@
|
||||||
name="email"
|
name="email"
|
||||||
class="input"
|
class="input"
|
||||||
id="email"
|
id="email"
|
||||||
aria-described-by="id_email_errors"
|
|
||||||
required
|
required
|
||||||
>
|
>
|
||||||
{% if error %}
|
|
||||||
<div id="id_email_errors">
|
|
||||||
<p class="help is-danger">
|
|
||||||
{% trans "No user matching this email address found." %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -134,19 +134,19 @@ class ConfirmEmail(View):
|
||||||
class ResendConfirmEmail(View):
|
class ResendConfirmEmail(View):
|
||||||
"""you probably didn't get the email because celery is slow but you can try this"""
|
"""you probably didn't get the email because celery is slow but you can try this"""
|
||||||
|
|
||||||
def get(self, request, error=False):
|
def get(self, request):
|
||||||
"""resend link landing page"""
|
"""resend link landing page"""
|
||||||
return TemplateResponse(request, "confirm_email/resend.html", {"error": error})
|
return TemplateResponse(request, "confirm_email/resend.html")
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
"""resend confirmation link"""
|
"""resend confirmation link"""
|
||||||
email = request.POST.get("email")
|
email = request.POST.get("email")
|
||||||
try:
|
try:
|
||||||
user = models.User.objects.get(email=email)
|
user = models.User.objects.get(email=email)
|
||||||
|
emailing.email_confirmation_email(user)
|
||||||
except models.User.DoesNotExist:
|
except models.User.DoesNotExist:
|
||||||
return self.get(request, error=True)
|
pass
|
||||||
|
|
||||||
emailing.email_confirmation_email(user)
|
|
||||||
return TemplateResponse(
|
return TemplateResponse(
|
||||||
request, "confirm_email/confirm_email.html", {"valid": True}
|
request, "confirm_email/confirm_email.html", {"valid": True}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue