diff --git a/hackathon/forms.py b/hackathon/forms.py index 2876768a..96c54b43 100644 --- a/hackathon/forms.py +++ b/hackathon/forms.py @@ -88,13 +88,14 @@ class HackathonForm(forms.ModelForm): }) ) is_public = forms.BooleanField(required=False) - is_register = forms.BooleanField(required=False, label="Allow external registrations") + allow_external_registrations = forms.BooleanField(required=False, label="Allow external registrations") registration_form = forms.URLField( label="External Registration Form", required=False, widget=forms.TextInput( attrs={ - 'placeholder': 'Add form url if the event is open to external participants' + 'placeholder': 'Add form url if the event is open to external participants', + 'type':'url', } ) ) @@ -109,7 +110,7 @@ class Meta: fields = ['display_name', 'description', 'theme', 'start_date', 'end_date', 'status', 'organisation', 'score_categories', 'team_size', 'tag_line', 'is_public', 'max_participants', - 'is_register', 'registration_form' + 'allow_external_registrations', 'registration_form' ] def __init__(self, *args, **kwargs): diff --git a/hackathon/migrations/0053_auto_20240912_1527.py b/hackathon/migrations/0053_auto_20240912_1527.py new file mode 100644 index 00000000..c6b74a02 --- /dev/null +++ b/hackathon/migrations/0053_auto_20240912_1527.py @@ -0,0 +1,22 @@ +# Generated by Django 3.1.13 on 2024-09-12 15:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('hackathon', '0052_auto_20240912_1324'), + ] + + operations = [ + migrations.RemoveField( + model_name='hackathon', + name='is_register', + ), + migrations.AddField( + model_name='hackathon', + name='allow_external_registrations', + field=models.BooleanField(default=False), + ), + ] diff --git a/hackathon/models.py b/hackathon/models.py index 6802d93a..66207b36 100644 --- a/hackathon/models.py +++ b/hackathon/models.py @@ -80,7 +80,7 @@ class Hackathon(models.Model): ) is_public = models.BooleanField(default=True) max_participants = models.IntegerField(default=None, null=True, blank=True) - is_register = models.BooleanField(default=True) + allow_external_registrations = models.BooleanField(default=False) registration_form = models.URLField( default="", blank=True, diff --git a/hackathon/templates/hackathon/create-event.html b/hackathon/templates/hackathon/create-event.html index e1a0ec55..f7196daf 100644 --- a/hackathon/templates/hackathon/create-event.html +++ b/hackathon/templates/hackathon/create-event.html @@ -59,7 +59,7 @@