Skip to content
Snippets Groups Projects
Commit 4f8a75c4 authored by magicfelix's avatar magicfelix
Browse files

Add min and max cost

parent eea08b8d
No related branches found
No related tags found
1 merge request!78Resolve "Rewrite registration wizard"
Pipeline #195897 passed
......@@ -62,7 +62,7 @@ class EditEventForm(ExtensibleForm):
Row("display_name", "slug", "description"),
Row("place", "published"),
Fieldset(_("Date data"), Row("date_event", "date_registration", "date_retraction")),
Fieldset(_("Event details"), Row("cost", "max_participants"), "information", "additional_fields", "contact_information_visible_fields"),
Fieldset(_("Event details"), Row("cost", "min_cost", "max_cost", "max_participants"), "information", "additional_fields", "contact_information_visible_fields"),
Fieldset(_("Terms"), "terms"),
Fieldset(_("Info mailings"), "info_mailings"),
),
......@@ -81,6 +81,8 @@ class EditEventForm(ExtensibleForm):
"date_registration",
"date_retraction",
"cost",
"min_cost",
"max_cost",
"max_participants",
"terms",
"information",
......
# Generated by Django 5.1.4 on 2025-02-10 14:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('paweljong', '0030_event_contact_information_visible_fields'),
]
operations = [
migrations.AddField(
model_name='event',
name='max_cost',
field=models.IntegerField(blank=True, default=None, null=True, verbose_name='Maximum cost in €'),
),
migrations.AddField(
model_name='event',
name='min_cost',
field=models.IntegerField(default=0, verbose_name='Minimum cost in €'),
),
]
......@@ -167,6 +167,8 @@ class Event(ExtensibleModel):
# Other details
cost = models.IntegerField(verbose_name=_("Cost in €"))
min_cost = models.IntegerField(verbose_name=_("Minimum cost in €"), default=0)
max_cost = models.IntegerField(verbose_name=_("Maximum cost in €"), default=None, null=True, blank=True)
max_participants = models.PositiveSmallIntegerField(verbose_name=_("Maximum participants"))
information = RichTextField(verbose_name=_("Information about the event"))
terms = models.ManyToManyField(Terms, verbose_name=_("Terms"), related_name="event", blank=True)
......
......@@ -13,6 +13,8 @@
* {% trans "Registration deadline" %}: {{ new_event.date_registration }}
* {% trans "Retraction deadline" %}: {{ new_event.date_retraction }}
* {% trans "Cost" %}: {{ new_event.cost }}
* {% trans "Minimum cost" %}: {{ new_event.min_cost }}
* {% trans "Maximum cost" %}: {{ new_event.max_cost }}
* {% trans "Max. participants" %}: {{ new_event.max_participants }}
* {% trans "Owners" %}:
{% for owner in new_event.group.owners.all %}
......@@ -41,6 +43,8 @@
<li> {% trans "Registration deadline" %}: {{ new_event.date_registration }}</li>
<li> {% trans "Retraction deadline" %}: {{ new_event.date_retraction }}</li>
<li> {% trans "Cost" %}: {{ new_event.cost }}</li>
<li> {% trans "Minimum cost" %}: {{ new_event.min_cost }}</li>
<li> {% trans "Maximum cost" %}: {{ new_event.max_cost }}</li>
<li> {% trans "Max. participants" %}: {{ new_event.max_participants }}</li>
<li> {% trans "Owners" %}</li>
<ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment