Skip to content

Commit 059c53d

Browse files
authored
Fix duplicate avatar source field (#295)
* Fix duplicate avatar_source field in Profile form * Fix coding style
1 parent ddf4f7b commit 059c53d

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

src/pretalx/cfp/templates/cfp/event/user_profile.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ <h2>{% translate "Your Profile" %}</h2>
3333
{% if request.event.cfp.request_avatar %}
3434
{% include "common/avatar.html" with user=request.user form=profile_form %}
3535
{% endif %}
36+
{% if profile_form.avatar_source %}{{ profile_form.avatar_source.as_field_group }}{% endif %}
37+
{% if profile_form.avatar_license %}{{ profile_form.avatar_license.as_field_group }}{% endif %}
3638
{% if profile_form.availabilities %}
3739
{% include "common/availabilities.html" %}
3840
{{ profile_form.availabilities.as_field_group }}

src/pretalx/cfp/views/wizard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from pretalx.common.exceptions import SendMailException
1414
from pretalx.common.text.phrases import phrases
1515

16+
logger = logging.getLogger(__name__)
17+
1618

1719
class SubmitStartView(EventPageMixin, View):
1820
@staticmethod
@@ -57,6 +59,7 @@ def dispatch(self, request, *args, **kwargs):
5759
if getattr(step, "is_before", False): # The current step URL is incorrect
5860
raise Http404()
5961
handler = getattr(step, request.method.lower(), self.http_method_not_allowed)
62+
logger.debug("Handler: %s", handler)
6063
result = handler(request)
6164

6265
if request.method == "POST" and request.POST.get("action", "submit") == "draft":

src/pretalx/common/templates/common/avatar.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
</div>
2727
</div>
2828
</div>
29-
<div class="avatar-form form-group row">
30-
<label class="col-md-3 col-form-label">{{ form.avatar_source.field.label }}</label>
31-
<div class="col-md-9">
32-
{{ form.avatar_source.as_widget }}
33-
</div>
34-
</div>
35-
<div class="avatar-form form-group row">
36-
<label class="col-md-3 col-form-label">{{ form.avatar_license.field.label }}</label>
37-
<div class="col-md-9">
38-
{{ form.avatar_license.as_widget }}
39-
</div>
40-
</div>
4129

4230
{% compress css %}
4331
<link rel="stylesheet" href="{% static "common/css/avatar.css" %}">

src/pretalx/orga/templates/orga/speaker/form.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ <h5>
7777
{% if form.avatar %}
7878
{% include "common/avatar.html" with user=form.instance.user form=form %}
7979
{% endif %}
80+
{% if form.avatar_source %}{{ form.avatar_source.as_field_group }}{% endif %}
81+
{% if form.avatar_license %}{{ form.avatar_license.as_field_group }}{% endif %}
8082

8183
{% if form.biography %}
8284
{{ form.biography.as_field_group }}

0 commit comments

Comments
 (0)