-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Try adding guest user library #3
base: main
Are you sure you want to change the base?
Changes from all commits
bdbd3c8
dc4a661
fe47ac8
450ff1a
df156c8
4ca3152
2adc77f
2ed7317
14be610
2684e65
e3af2b0
cad3452
8390368
c0dd8e7
c1846b0
c2d9b70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
{% extends "account/base.html" %} | ||
{% load i18n account %} | ||
{% load i18n account %} | ||
|
||
{% block head_title %}{% translate "Login" %}{% endblock %} | ||
{% block head_title %}{% translate "Login" %}{% endblock head_title %} | ||
|
||
{% block content %} | ||
<h1>{% translate "Login" %}</h1> | ||
|
||
<p>{% blocktranslate %}If you have not created an account yet, then please <a href="{{ signup_url }}">register</a> first.{% endblocktranslate %}</p> | ||
|
||
<form method="POST" action="{% url 'account_login' %}" class="u-spacer-bottom-double"> | ||
{% url 'guest_create' as guest_create_url %} | ||
{% with next_param=request.GET.next %} | ||
{% with guest_url=guest_create_url|add:"?next="|add:next_param %} | ||
<p>{% blocktranslate %}Sie wollen als Gast fortfahren? Dann klicken Sie <a href="{{ guest_url }}">hier</a>.{% endblocktranslate %}</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need the english version here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Asked Janek for english text yesterday, so waiting to add the content of these pages until I have that and can just do everything at once |
||
{% endwith %} | ||
{% endwith %} | ||
|
||
<form method="post" action="{% url 'account_login' %}" class="u-spacer-bottom-double"> | ||
{{ form.non_field_errors }} | ||
{% csrf_token %} | ||
|
||
|
@@ -33,4 +39,4 @@ <h1>{% translate "Login" %}</h1> | |
</form> | ||
|
||
{% include "socialaccount/snippets/provider_list.html" with process="login" %} | ||
{% endblock %} | ||
{% endblock content %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
{% load i18n %} | ||
{% block head_title %} | ||
{% translate "Register" %} | ||
{% endblock %} | ||
{% endblock head_title %} | ||
{% block content %} | ||
<h1>{% translate "Register" %}</h1> | ||
{% with page=settings.a4_candy_cms_settings.ImportantPages.registration %} | ||
|
@@ -14,6 +14,15 @@ <h1>{% translate "Register" %}</h1> | |
{% blocktranslate %}Already have an account? Then please | ||
<a href="{{ login_url }}">login</a>.{% endblocktranslate %} | ||
</p> | ||
{% url 'guest_create' as guest_create_url %} | ||
{% with next_param=request.GET.next %} | ||
{% with guest_url=guest_create_url|add:"?next="|add:next_param %} | ||
<p> | ||
{% blocktranslate %}Sie wollen als Gast fortfahren? Dann klicken Sie | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
<a href="{{ guest_url }}">hier</a>.{% endblocktranslate %} | ||
</p> | ||
{% endwith %} | ||
{% endwith %} | ||
<form id="signup_form" method="post" action="{% url 'account_signup' %}"> | ||
{{ form.non_field_errors }} | ||
{{ form.media }} | ||
|
@@ -71,4 +80,4 @@ <h1>{% translate "Register" %}</h1> | |
</div> | ||
</form> | ||
{% include "socialaccount/snippets/provider_list.html" with process="login" %} | ||
{% endblock %} | ||
{% endblock content %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% extends "a4_candy_account/account_dashboard.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block title %}{% translate 'Your user profile' %} — {{ block.super }}{% endblock %} | ||
{% block dashboard_content %} | ||
<h1 class="mt-0">{% translate 'Convert to regular account' %}</h1> | ||
|
||
<form enctype="multipart/form-data" action="{{ request.path }}" method="post"> | ||
{% csrf_token %} | ||
|
||
{% for field in form %} | ||
{% if not field.name == 'get_notifications' and not field.name == 'get_newsletters' %} | ||
{% include 'a4_candy_contrib/includes/form_field.html' with field=field %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% include 'a4_candy_contrib/includes/form_checkbox_field.html' with field=form.get_notifications %} | ||
{% include 'a4_candy_contrib/includes/form_checkbox_field.html' with field=form.get_newsletters %} | ||
|
||
<div class="d-flex justify-content-end mb-3"> | ||
<button type="submit" class="btn btn--primary">{% translate 'Register'%}</button> | ||
</div> | ||
</form> | ||
{{ form.media }} | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this in the fork of the django-guest, because the long uuid appears on the menu tab and it's ugly. So I switched to the numbered version. But maybe we deploy this one, and PM can let us know.