diff --git a/applications/forms/volunteer.py b/applications/forms/volunteer.py index 2dd1e71b1..73d399864 100644 --- a/applications/forms/volunteer.py +++ b/applications/forms/volunteer.py @@ -91,6 +91,7 @@ def __init__(self, *args, **kwargs): {"name": "under_age", "space": 12}, {"name": "studies_and_course", "space": 12}, {"name": "hear_about_us", "space": 12}, + {"name": "other_hear_about_us", "space": 12}, {"name": "origin", "space": 12}, ], "description": "Hola voluntari@, necesitamos un poco de información antes de empezar :)", @@ -247,6 +248,7 @@ def clean_hear_about_us(self): "graduation_year": forms.HiddenInput(), "phone_number": forms.HiddenInput(), "hear_about_us": CustomSelect(choices=models.HEARABOUTUS_ES), + "other_hear_about_us": forms.TextInput(attrs={"autocomplete": "off"}), "tshirt_size": forms.Select(), "diet": forms.Select(), } @@ -268,6 +270,7 @@ def clean_hear_about_us(self): "cool_skill": "¿Qué habilidad interesante o dato curioso tienes? ¡Sorpréndenos! 🎉", "friends": "¿Estás aplicando con otr@s amig@s? Escribe sus nombres completos", "hear_about_us": "¿Cómo escuchaste sobre nosotros por primera vez?", + "other_hear_about_us": "Especifica cómo nos conociste:", "volunteer_motivation": "¿Por qué quieres asistir como voluntari@ a HackUPC?", } diff --git a/applications/migrations/0061_volunteerapplication_other_hear_about_us.py b/applications/migrations/0061_volunteerapplication_other_hear_about_us.py new file mode 100644 index 000000000..a32e25f01 --- /dev/null +++ b/applications/migrations/0061_volunteerapplication_other_hear_about_us.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.23 on 2025-12-21 22:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('applications', '0060_volunteerapplication_studies_and_course'), + ] + + operations = [ + migrations.AddField( + model_name='volunteerapplication', + name='other_hear_about_us', + field=models.CharField(blank=True, max_length=500, null=True), + ), + ] diff --git a/applications/models/volunteer.py b/applications/models/volunteer.py index 043ad885e..c5f0b32d6 100644 --- a/applications/models/volunteer.py +++ b/applications/models/volunteer.py @@ -83,6 +83,7 @@ class VolunteerApplication(BaseApplication): #About us hear_about_us = models.CharField(max_length=300, choices=HEARABOUTUS_ES, default="") + other_hear_about_us = models.CharField(max_length=500, blank=True, null=True) # University graduation_year = models.IntegerField(choices=YEARS, default=DEFAULT_YEAR) diff --git a/applications/templates/include/application_form.html b/applications/templates/include/application_form.html index 405bb2743..58067e858 100644 --- a/applications/templates/include/application_form.html +++ b/applications/templates/include/application_form.html @@ -227,6 +227,12 @@ conditional_field(other_gender, gender, function () { return gender.val() === 'X'; }, 1); + + var other_hear_about_us = $('#id_other_hear_about_us'); + var hear_about_us = $('#id_hear_about_us'); + conditional_field(other_hear_about_us, hear_about_us, function () { + return hear_about_us.val() === 'Otros'; + }, 1); var online = $('input[name="online"][value="True"]'); var face_to_face = $('input[name="online"][value="False"]'); diff --git a/organizers/templates/other_application_detail.html b/organizers/templates/other_application_detail.html index 224bc3b2b..8a2bf232b 100644 --- a/organizers/templates/other_application_detail.html +++ b/organizers/templates/other_application_detail.html @@ -77,6 +77,7 @@