-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2067 from alphagov/transition-add-downtime-page/r…
…ename-datetime-fields Transition add downtime page/rename datetime fields
- Loading branch information
Showing
9 changed files
with
163 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<% | ||
date_legend_text ||= nil | ||
time_legend_text ||= nil | ||
|
||
year ||= nil | ||
month ||= nil | ||
day ||= nil | ||
date_input_items = [] | ||
date_input_items << day if day | ||
date_input_items << month if month | ||
date_input_items << year if year | ||
date_input_items = nil unless date_input_items.any? | ||
|
||
hour ||= nil | ||
minute ||= nil | ||
time_input_items = [] | ||
time_input_items << hour if hour | ||
time_input_items << minute if minute | ||
time_input_items = nil unless time_input_items.any? | ||
%> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-one-half"> | ||
<%= render "govuk_publishing_components/components/fieldset", { | ||
legend_text: date_legend_text, | ||
heading_size: "m" | ||
} do %> | ||
<%= render "govuk_publishing_components/components/date_input", { | ||
hint: "For example, 01 08 2022", | ||
items: date_input_items, | ||
} %> | ||
<% end %> | ||
</div> | ||
<div class="govuk-grid-column-one-half"> | ||
<%= render "govuk_publishing_components/components/fieldset", { | ||
legend_text: time_legend_text, | ||
heading_size: "m" | ||
} do %> | ||
<%= render "time_input", { | ||
hint: "For example, 9:30 or 19:30", | ||
items: time_input_items, | ||
} %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains 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 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 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 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
File renamed without changes.
Oops, something went wrong.