Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/instructions/jinja.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
applyTo: "app/eventyay/**/jinja-templates/**/*.jinja"
---

# Jinja Template Instructions

## Formatting

- Prefer single quotes in template markup and expressions.
- Use different quote styles when nesting quotes inside expressions.
- Use 2-space indentation.

## Template logic

- Keep templates focused on presentation. Move non-trivial business logic to Python views/forms/helpers.
- Avoid complex conditional chains inside HTML attributes. Compute values before rendering when possible.
9 changes: 4 additions & 5 deletions app/eventyay/base/configurations/default_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext_noop, pgettext, pgettext_lazy
from i18nfield.forms import I18nFormField, I18nTextarea, I18nTextInput
from eventyay.base.forms import I18nAutoExpandingTextarea
from i18nfield.strings import LazyI18nString
from rest_framework import serializers

Expand All @@ -27,7 +26,7 @@
from eventyay.base.configurations.lazy_i18n_string_list_base import (
LazyI18nStringList,
)
from eventyay.base.forms import I18nURLFormField
from eventyay.base.forms import I18nAutoExpandingTextarea, I18nURLFormField
from eventyay.base.models.tax import TaxRule
from eventyay.base.reldate import (
RelativeDateField,
Expand Down Expand Up @@ -234,7 +233,7 @@ def primary_font_kwargs():
),
},
'include_wikimedia_username': {
'default': 'False',
'default': 'True',
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the global default for the include_wikimedia_username event setting from False to True has broader effects than speaker export: it will enable Wikimedia username collection/display in checkout and include it in other exports (e.g. order list export) by default for new events. Please confirm this wider default change is intended; if the goal is only to default the speaker export column to included, this setting default should likely remain False.

Suggested change
'default': 'True',
'default': 'False',

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is intended.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hongquan

enable Wikimedia username collection/display in checkout

So, this means the ticketing checkout would always have "wikimedia" enabled? The decision if it is enabled should depend on the ticketing configuration. As far as I understand though, if we have it enabled here, it must be enabled in the ticketing config as well or how?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariobehling This PR makes it enabled at the same time for two places: Ticketing and Speaker export (Talk). These two are not linked yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, in that case there should be a helper text and a link to the other place, I think.

Enabling this option will also collect the Wikimedia username during ticketing, if ticketing is enabled, and include it in the checkout process. For more details, see [link to relevant section].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still Wikimedia should not be a default field for all events. E.g. we dont want it on eventyay.com. It is preferable for wikimedia.eventyay.com though.

So, what options are there to control this? Maybe we need a config option for the platform?

In particular events on eventyay.com should not include Wikimedia as a default.

785580f9-2e3f-464f-b661-87024ff0a47e

'type': bool,
'form_class': forms.BooleanField,
'serializer_class': serializers.BooleanField,
Expand Down Expand Up @@ -2790,7 +2789,7 @@ def primary_font_kwargs():
),
'concatenation': lambda d: (
str(d.get('family_name', ''))
+ str((', ' if d.get('family_name') and d.get('given_name') else ''))
+ str(', ' if d.get('family_name') and d.get('given_name') else '')
+ str(d.get('given_name', ''))
),
'sample': {
Expand Down Expand Up @@ -2893,7 +2892,7 @@ def primary_font_kwargs():
),
'concatenation': lambda d: (
' '.join(str(p) for p in (d.get(key, '') for key in ['title', 'given_name', 'family_name']) if p)
+ str((', ' if d.get('degree') else ''))
+ str(', ' if d.get('degree') else '')
+ str(d.get('degree', ''))
),
'sample': {
Expand Down
67 changes: 67 additions & 0 deletions app/eventyay/jinja-templates/socialaccount/signup.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{% extends 'account/base.jinja' %}

{% block head_title %}
{{ _('Sign Up') }}
{% endblock head_title %}

{% block content %}
<div class='password-reset-container'>
<h1>{{ _('Sign Up') }}</h1>

Comment thread
hongquan marked this conversation as resolved.
<p class='description'>
{% set provider_name = account.get_provider().name %}
{{ _(
'You are about to use your {provider_name} account to login to {site_name}. '
'As a final step, please complete the following form:'
).format(provider_name=provider_name, site_name=site.name) }}
</p>

{% if form.non_field_errors() %}
<div class='alert alert-danger'>
<i class='fa fa-exclamation-triangle'></i>
{% for error in form.non_field_errors() %}
<p>{{ error }}</p>
{% endfor %}
</div>
{% endif %}

<form method='post' action="{{ url_for('socialaccount_signup') }}" class='password-form'>
Comment thread
Saksham-Sirohi marked this conversation as resolved.
<input type='hidden' name='csrfmiddlewaretoken' value='{{ csrf_token }}'>

{% for hidden in form.hidden_fields() %}
{{ hidden }}
{% endfor %}

{% for field in form.visible_fields() %}
<div class='form-group'>
<label for='{{ field.id_for_label }}'>
{{ field.label }}
{% if field.field.required %}<span class='required'>*</span>{% endif %}
</label>
{{ field }}
{% if field.errors %}
<div class='field-error'>
{% for error in field.errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
{% if field.help_text %}
<div class='field-help'>{{ field.help_text }}</div>
{% endif %}
</div>
{% endfor %}

{% if redirect_field %}
{{ redirect_field }}
{% elif redirect_field_name and redirect_field_value %}
<input type='hidden' name='{{ redirect_field_name }}' value='{{ redirect_field_value }}'>
{% endif %}

<button type='submit' class='btn btn-primary btn-lg'>
<i class='fa fa-user-plus'></i>
{{ _('Sign Up') }}
</button>
</form>
</div>
{% endblock content %}
12 changes: 10 additions & 2 deletions app/eventyay/orga/forms/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _

from eventyay.base.models import SubmissionStates, User
from eventyay.common.text.phrases import phrases
from eventyay.orga.forms.export import ExportForm
from eventyay.base.models import User
from eventyay.base.models import SubmissionStates


class SpeakerExportForm(ExportForm):
Expand Down Expand Up @@ -54,6 +53,11 @@ def __init__(self, *args, **kwargs):
label=_('Picture License'),
help_text=_("The license of the speaker's profile picture"),
)
self.fields['wikimedia_username'] = forms.BooleanField(
required=False,
label=_('Wikimedia Username'),
initial=True,
)

@cached_property
def questions(self):
Expand All @@ -74,6 +78,7 @@ def export_field_names(self):
'avatar_license',
'submission_ids',
'submission_titles',
'wikimedia_username',
]
Comment on lines 78 to 82
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export_field_names always includes wikimedia_username. If you decide to hide/disable Wikimedia IDs based on event.settings.include_wikimedia_username (consistent with checkout and order export), this list should also be conditional; otherwise ExportForm.export_fields/export_data can crash due to missing self.fields['wikimedia_username'] or unexpectedly allow exporting the value when the setting is off.

Copilot uses AI. Check for mistakes.

def get_queryset(self):
Expand All @@ -99,6 +104,9 @@ def _get_submission_ids_value(self, obj):
def _get_submission_titles_value(self, obj):
return list(obj.submissions.filter(event=self.event).values_list('title', flat=True))

def _get_wikimedia_username_value(self, obj):
return obj.wikimedia_username

def _prepare_object_data(self, obj):
obj._profile = obj.event_profile(self.event)
return obj
Expand Down
Loading