Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pretix public registrations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIF
Pretix public registrations
Commits
c6864297
Commit
c6864297
authored
5 years ago
by
Felix Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
Add a hint which questions will be publicly shown
parent
e1daa9d9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pretix_public_registrations/locale/de/LC_MESSAGES/django.po
+9
-4
9 additions, 4 deletions
pretix_public_registrations/locale/de/LC_MESSAGES/django.po
pretix_public_registrations/signals.py
+12
-1
12 additions, 1 deletion
pretix_public_registrations/signals.py
with
21 additions
and
5 deletions
pretix_public_registrations/locale/de/LC_MESSAGES/django.po
+
9
−
4
View file @
c6864297
...
@@ -2,7 +2,7 @@ msgid ""
...
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: \n"
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-1
1 22
:4
8
+0200\n"
"POT-Creation-Date: 2019-09-1
2 10
:4
4
+0200\n"
"PO-Revision-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Felix Schäfer\n"
"Last-Translator: Felix Schäfer\n"
"Language-Team: \n"
"Language-Team: \n"
...
@@ -15,7 +15,6 @@ msgstr ""
...
@@ -15,7 +15,6 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPath-0: .\n"
#: __init__.py:13
#: __init__.py:13
#| msgid "Public registration"
msgid "Pretix public registrations"
msgid "Pretix public registrations"
msgstr ""
msgstr ""
...
@@ -43,10 +42,16 @@ msgstr "Teilnehmername anzeigen"
...
@@ -43,10 +42,16 @@ msgstr "Teilnehmername anzeigen"
msgid "Show product name"
msgid "Show product name"
msgstr "Produktname anzeigen"
msgstr "Produktname anzeigen"
#: signals.py:
38
#: signals.py:
46
msgid "Public registration"
msgid "Public registration"
msgstr "Öffentliche Anmeldung"
msgstr "Öffentliche Anmeldung"
#: signals.py:97
#: signals.py:49
#, python-format
msgid ""
"The answers to the following questions will be publicly shown: %(qlist)s"
msgstr "Antworten auf folgende Fragen werden öffentlich angezeigt: %(qlist)s"
#: signals.py:108
msgid "Public registrations"
msgid "Public registrations"
msgstr "Öffentliche Anmeldungen"
msgstr "Öffentliche Anmeldungen"
This diff is collapsed.
Click to expand it.
pretix_public_registrations/signals.py
+
12
−
1
View file @
c6864297
...
@@ -34,10 +34,21 @@ def add_public_registrations_html_head(sender, request=None, **kwargs):
...
@@ -34,10 +34,21 @@ def add_public_registrations_html_head(sender, request=None, **kwargs):
@receiver
(
question_form_fields
,
dispatch_uid
=
"
public_registration_question
"
)
@receiver
(
question_form_fields
,
dispatch_uid
=
"
public_registration_question
"
)
def
add_public_registration_question
(
sender
,
position
,
**
kwargs
):
def
add_public_registration_question
(
sender
,
position
,
**
kwargs
):
if
str
(
position
.
item
.
pk
)
in
sender
.
settings
.
get
(
'
public_registrations_items
'
):
if
str
(
position
.
item
.
pk
)
in
sender
.
settings
.
get
(
'
public_registrations_items
'
):
public_questions
=
sender
.
questions
.
filter
(
pk__in
=
sender
.
settings
.
get
(
'
public_registrations_questions
'
))
headers
=
(
[
_
(
"
Product
"
)]
if
sender
.
settings
.
get
(
'
public_registrations_show_item_name
'
)
else
[]
)
+
(
[
_
(
"
Name
"
)]
if
sender
.
settings
.
get
(
'
public_registrations_show_attendee_name
'
)
else
[]
)
+
[
q
.
question
for
q
in
public_questions
]
return
{
'
public_registrations_public_registration
'
:
forms
.
BooleanField
(
return
{
'
public_registrations_public_registration
'
:
forms
.
BooleanField
(
label
=
_
(
'
Public registration
'
),
label
=
_
(
'
Public registration
'
),
required
=
False
,
required
=
False
,
help_text
=
sender
.
settings
.
get
(
'
public_registrations_field_help_text
'
,
as_type
=
LazyI18nString
),
help_text
=
_
(
'
The answers to the following questions will be publicly shown: %(qlist)s
'
%
{
'
qlist
'
:
"
,
"
.
join
(
str
(
h
)
for
h
in
headers
)}
),
)}
)}
else
:
else
:
return
{}
return
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment