Skip to content

Commit

Permalink
Removes oninput for challenge request form
Browse files Browse the repository at this point in the history
The old functionality was to drop invalid values, this does not
seem user friendly. Now, we use the default behavioud of
the browser forcing the user to fill in a valid value
when they try to submit the form instead.

Closes #3748
  • Loading branch information
jmsmkn committed Dec 13, 2024
1 parent af782e5 commit 5f5d81f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
27 changes: 0 additions & 27 deletions app/grandchallenge/challenges/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,33 +193,6 @@ class Meta:
widgets = {
"start_date": forms.TextInput(attrs={"type": "date"}),
"end_date": forms.TextInput(attrs={"type": "date"}),
"expected_number_of_teams": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"number_of_tasks": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"average_size_of_test_image_in_mb": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"inference_time_limit_in_minutes": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"phase_1_number_of_submissions_per_team": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"phase_2_number_of_submissions_per_team": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"phase_1_number_of_test_images": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"phase_2_number_of_test_images": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
"budget_for_hosting_challenge": forms.NumberInput(
attrs={"oninput": "validity.valid||(value='');"}
),
}
labels = {
"short_name": "Acronym",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class Migration(migrations.Migration):
model_name="challengerequest",
name="budget_for_hosting_challenge",
field=models.PositiveIntegerField(
default=0,
help_text="What is your budget for hosting this challenge? Please be reminded of our <a href='/challenge-policy-and-pricing/'>challenge pricing policy</a>.",
),
),
Expand Down
1 change: 0 additions & 1 deletion app/grandchallenge/challenges/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,6 @@ class ChallengeRequestStatusChoices(models.TextChoices):
validators=[MinValueValidator(limit_value=1)],
)
budget_for_hosting_challenge = models.PositiveIntegerField(
default=0,
help_text="What is your budget for hosting this challenge? Please be reminded of our <a href='/challenge-policy-and-pricing/'>challenge pricing policy</a>.",
)
long_term_commitment = models.BooleanField(
Expand Down

0 comments on commit 5f5d81f

Please sign in to comment.