-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Added date configuration to Schedule & Details settings page #30314
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,6 +182,11 @@ | |
| # templates. | ||
| STUDIO_NAME = _("Your Platform Studio") | ||
| STUDIO_SHORT_NAME = _("Studio") | ||
|
|
||
| # .. setting_name: SCHEDULE_DETAIL_FORMAT | ||
| # .. setting_default: MM/DD/YYYY' | ||
| # .. setting_description: Settings to configure the date format in Schedule & Details page | ||
| SCHEDULE_DETAIL_FORMAT = 'MM/DD/YYYY' | ||
|
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. Can we specify that this is configured globally? |
||
| FEATURES = { | ||
| 'GITHUB_PUSH': False, | ||
|
|
||
|
|
@@ -516,6 +521,7 @@ | |
| # in the LMS and CMS. | ||
| # .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429' | ||
| 'DISABLE_UNENROLLMENT': False, | ||
|
|
||
|
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. I think this change is not needed? |
||
| } | ||
|
|
||
| # .. toggle_name: ENABLE_COPPA_COMPLIANCE | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,7 +97,12 @@ function($, date, TriggerChangeEventOnEnter) { | |
|
|
||
| // instrument as date and time pickers | ||
| timefield.timepicker({timeFormat: 'H:i'}); | ||
| datefield.datepicker(); | ||
| var placeholder = datefield.attr('placeholder'); | ||
| if (placeholder == 'DD/MM/YYYY') { | ||
| datefield.datepicker({dateFormat: 'dd/mm/yy'}); | ||
|
Comment on lines
+101
to
+102
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. Why is this specific case? |
||
| } else { | ||
| datefield.datepicker(); | ||
| } | ||
|
|
||
| // Using the change event causes setfield to be triggered twice, but it is necessary | ||
| // to pick up when the date is typed directly in the field. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked around what we should do about using site configurations since it's set to be deprecated. The initial response is not to add more technical debt given this will need to be removed once site config it's no longer used.
But I see you used the default to Django settings, so using site configurations is not obligatory. Great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: there's a new note in the OEP-51 specifying what to consider before using a soon-to-be a deprecated feature:https://open-edx-proposals.readthedocs.io/en/latest/processes/oep-0021-proc-deprecation.html#accepted