Skip to content

Commit

Permalink
UI Improvements (#61)
Browse files Browse the repository at this point in the history
* Display a message when no problem in contest exists

Signed-off-by: Prateek Kumar <[email protected]>

* Make buttons smaller

Signed-off-by: Prateek Kumar <[email protected]>

* Fix form validation issue when some date is none

Signed-off-by: Prateek Kumar <[email protected]>

* Remove unnecessary css and js files

Signed-off-by: Prateek Kumar <[email protected]>
  • Loading branch information
prateekkumarweb authored May 2, 2019
1 parent c8a2694 commit ab4983e
Show file tree
Hide file tree
Showing 118 changed files with 22 additions and 41,232 deletions.
9 changes: 5 additions & 4 deletions judge/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ def _check_valid_date(cleaned_data):
cont_start = cleaned_data.get("contest_start")
cont_soft_end = cleaned_data.get("contest_soft_end")
cont_hard_end = cleaned_data.get("contest_hard_end")
if cont_start > cont_soft_end:
raise forms.ValidationError("Contest cannot end before it starts!")
if cont_soft_end > cont_hard_end:
raise forms.ValidationError("The final deadline cannot be before the soft deadline")
if cont_start and cont_soft_end and cont_hard_end:
if cont_start > cont_soft_end:
raise forms.ValidationError("Contest cannot end before it starts!")
if cont_soft_end > cont_hard_end:
raise forms.ValidationError("The final deadline cannot be before the soft deadline")


class MultiEmailField(forms.Field):
Expand Down
Loading

0 comments on commit ab4983e

Please sign in to comment.