-
Notifications
You must be signed in to change notification settings - Fork 168
Replace bootstrap-datetimepicker #2608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
HannesClausnitzer
wants to merge
17
commits into
e-valuation:main
from
HannesClausnitzer:datetimepicker
Closed
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
982e7e3
implement native datetime picker
HannesClausnitzer 96ef45f
changed more fields
HannesClausnitzer 8eb3d24
remove unnecessary bootstrap-datetimepicker references
HannesClausnitzer 6439923
fixed input field type
HannesClausnitzer 79d0852
bring back accidentally deleted js copy headers
HannesClausnitzer 20219d4
removed static files that are no longer needed
HannesClausnitzer 1552cdc
remove bootstrap references
HannesClausnitzer 979ae27
custom template for DateTimeInput
HannesClausnitzer f40355d
include value in datetime template
HannesClausnitzer 1f4a889
implement new datetimepicker
HannesClausnitzer ae3619a
08:00 as default time
HannesClausnitzer 73f0337
open picker on click
HannesClausnitzer 1c4eb9d
rewrite in typescript
HannesClausnitzer e49ebf5
fix stuff
HannesClausnitzer b99dbc9
improvements
HannesClausnitzer 98ca7b0
more improvements
HannesClausnitzer b01f1e2
implement correct import syntax
HannesClausnitzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,3 @@ | |
| } | ||
| } | ||
| </script> | ||
|
|
||
| {% block additional_javascript %} | ||
| {% include 'bootstrap_datetimepicker.html' %} | ||
| {% endblock %} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,8 +99,19 @@ def clean(self): | |
| class ImportForm(forms.Form): | ||
| use_required_attribute = False | ||
|
|
||
| vote_start_datetime = forms.DateTimeField(label=_("Start of evaluation"), localize=True, required=False) | ||
| vote_end_date = forms.DateField(label=_("End of evaluation"), localize=True, required=False) | ||
| vote_start_datetime = forms.DateTimeField( | ||
| label=_("Start of evaluation"), | ||
| widget=forms.DateTimeInput(attrs={"type": "datetime-local", "class": "form-control"}), | ||
| localize=True, | ||
| required=False, | ||
| ) | ||
|
|
||
| vote_end_date = forms.DateField( | ||
| label=_("End of evaluation"), | ||
| widget=forms.DateInput(attrs={"type": "date", "class": "form-control"}), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do we need |
||
| localize=True, | ||
| required=False, | ||
| ) | ||
|
|
||
| excel_file = forms.FileField( | ||
| label=_("Excel file"), | ||
|
|
@@ -283,8 +294,18 @@ def __init__(self, *args, **kwargs): | |
|
|
||
| class CourseCopyForm(CourseFormMixin, forms.ModelForm): # type: ignore[misc] | ||
| semester = forms.ModelChoiceField(Semester.objects.all()) | ||
| vote_start_datetime = forms.DateTimeField(label=_("Start of evaluations"), localize=True) | ||
| vote_end_date = forms.DateField(label=_("Last day of evaluations"), localize=True) | ||
|
|
||
| vote_start_datetime = forms.DateTimeField( | ||
| label=_("Start of evaluations"), | ||
| localize=True, | ||
| widget=forms.DateTimeInput(attrs={"type": "datetime-local", "class": "form-control"}), | ||
| ) | ||
|
|
||
| vote_end_date = forms.DateField( | ||
| label=_("Last day of evaluations"), | ||
| localize=True, | ||
| widget=forms.DateInput(attrs={"type": "date", "class": "form-control"}), | ||
| ) | ||
|
|
||
| field_order = ["semester"] | ||
|
|
||
|
|
@@ -401,6 +422,10 @@ class Meta: | |
| field_classes = { | ||
| "participants": UserModelMultipleChoiceField, | ||
| } | ||
| widgets = { | ||
| "vote_start_datetime": forms.DateTimeInput(attrs={"type": "datetime-local", "class": "form-control"}), | ||
| "vote_end_date": forms.DateInput(attrs={"type": "date", "class": "form-control"}), | ||
| } | ||
|
|
||
| def __init__(self, *args, requires_decided_main_language=False, **kwargs): | ||
| semester = kwargs.pop("semester", None) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.