Skip to content

Commit ed3bdc4

Browse files
authored
Merge pull request #409 from hackupc/volunteer-hear-about-us-question
Appli volunteer: hear about us question
2 parents 8c5c2dc + 447a958 commit ed3bdc4

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

applications/forms/volunteer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def __init__(self, *args, **kwargs):
9191
{"name": "under_age", "space": 12},
9292
{"name": "studies_and_course", "space": 12},
9393
{"name": "hear_about_us", "space": 12},
94+
{"name": "other_hear_about_us", "space": 12},
9495
{"name": "origin", "space": 12},
9596
],
9697
"description": "Hola voluntari@, necesitamos un poco de información antes de empezar :)",
@@ -247,6 +248,7 @@ def clean_hear_about_us(self):
247248
"graduation_year": forms.HiddenInput(),
248249
"phone_number": forms.HiddenInput(),
249250
"hear_about_us": CustomSelect(choices=models.HEARABOUTUS_ES),
251+
"other_hear_about_us": forms.TextInput(attrs={"autocomplete": "off"}),
250252
"tshirt_size": forms.Select(),
251253
"diet": forms.Select(),
252254
}
@@ -268,6 +270,7 @@ def clean_hear_about_us(self):
268270
"cool_skill": "¿Qué habilidad interesante o dato curioso tienes? ¡Sorpréndenos! 🎉",
269271
"friends": "¿Estás aplicando con otr@s amig@s? Escribe sus nombres completos",
270272
"hear_about_us": "¿Cómo escuchaste sobre nosotros por primera vez?",
273+
"other_hear_about_us": "Especifica cómo nos conociste:",
271274
"volunteer_motivation": "¿Por qué quieres asistir como voluntari@ a HackUPC?",
272275
}
273276

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.2.23 on 2025-12-21 22:39
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('applications', '0060_volunteerapplication_studies_and_course'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='volunteerapplication',
15+
name='other_hear_about_us',
16+
field=models.CharField(blank=True, max_length=500, null=True),
17+
),
18+
]

applications/models/volunteer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class VolunteerApplication(BaseApplication):
8383

8484
#About us
8585
hear_about_us = models.CharField(max_length=300, choices=HEARABOUTUS_ES, default="")
86+
other_hear_about_us = models.CharField(max_length=500, blank=True, null=True)
8687

8788
# University
8889
graduation_year = models.IntegerField(choices=YEARS, default=DEFAULT_YEAR)

applications/templates/include/application_form.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@
227227
conditional_field(other_gender, gender, function () {
228228
return gender.val() === 'X';
229229
}, 1);
230+
231+
var other_hear_about_us = $('#id_other_hear_about_us');
232+
var hear_about_us = $('#id_hear_about_us');
233+
conditional_field(other_hear_about_us, hear_about_us, function () {
234+
return hear_about_us.val() === 'Otros';
235+
}, 1);
230236

231237
var online = $('input[name="online"][value="True"]');
232238
var face_to_face = $('input[name="online"][value="False"]');

organizers/templates/other_application_detail.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ <h3>Other questions</h3>
7777
{% include 'include/field.html' with desc='Dietary restrictions' value=app.diet %}
7878
{% include 'include/field.html' with desc='Other diet' value=app.other_diet %}
7979
{% include 'include/field.html' with desc='How you meet us' value=app.hear_about_us %}
80+
{% include 'include/field.html' with desc='Other (how you meet us)' value=app.other_hear_about_us %}
8081
<hr>
8182
<dt>
8283
<h3>Extra</h3>

0 commit comments

Comments
 (0)