Skip to content
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

Schedule Edit: Fix missing relative time checkbox on custom schedule #2784

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions views/schedule-form-edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@
</div>
</div>

{% set title %}{% trans "Use Relative time?" %}{% endset %}
{% set helpText %}{% trans "Switch between relative time inputs and Date pickers for start and end time." %}{% endset %}
{{ forms.checkbox("relativeTime", title, relativeTime, helpText, 'relative-time-checkbox') }}

{% set title %}{% trans "Hours" %}{% endset %}
{% set helpText %}{% trans "Hours this event should be scheduled for" %}{% endset %}
{{ forms.number("hours", title, "", helpText, "duration-part relative-time-control") }}

{% set title %}{% trans "Minutes" %}{% endset %}
{% set helpText %}{% trans "Minutes this event should be scheduled for" %}{% endset %}
{{ forms.number("minutes", title, "", helpText, "duration-part relative-time-control") }}

{% set title %}{% trans "Seconds" %}{% endset %}
{% set helpText %}{% trans "Seconds this event should be scheduled for" %}{% endset %}
{{ forms.number("seconds", title, "", helpText, "schedule-now-seconds-field duration-part relative-time-control") }}

{% set messageNoSyncTimezone %}{% trans %}Your event will be scheduled from [fromDt] to [toDt] in each of your selected Displays respective timezones{% endtrans %}{% endset %}
{% set messageSyncTimezone %}{% trans %}Your event will be scheduled from [fromDt] to [toDt] in the CMS timezone, please check this covers each of your Displays in their respective timezones.{% endtrans %}{% endset %}
<div class="alert alert-info scheduleNowMessage d-none relative-time-control" data-template-sync="{{ messageSyncTimezone }}" data-template-no-sync="{{ messageNoSyncTimezone }}"></div>

{% set title %}{% trans "Start Time" %}{% endset %}
{% set helpText %}{% trans "Select the start time for this event" %}{% endset %}
{{ forms.dateTime("fromDt", title, event.fromDt, helpText, "starttime-control", "required", "") }}
Expand Down