-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move opening times markup into a partial
- Loading branch information
1 parent
4998b67
commit 27c0650
Showing
2 changed files
with
31 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div data-controller="opening-times" data-opening-times-data-value='<%= @partner.opening_times %>'> | ||
<ul class="list-group" data-opening-times-target="list"> | ||
</ul> | ||
|
||
<div class="mt-3 input-group flex-row align-items-center justify-content-sm-between flex-wrap"> | ||
<label class="m-0" for="day">Day | ||
<select class="ml-1" id="day" data-opening-times-target="day"> | ||
<option value="Monday">Monday</option> | ||
<option value="Tuesday">Tuesday</option> | ||
<option value="Wednesday">Wednesday</option> | ||
<option value="Thursday">Thursday</option> | ||
<option value="Friday">Friday</option> | ||
<option value="Saturday">Saturday</option> | ||
<option value="Sunday">Sunday</option> | ||
</select> | ||
</label> | ||
<label class="m-0" for="open">Opening Time | ||
<input class="ml-1" id="open" type="time" name="" value="00:00" data-opening-times-target="open"> | ||
</label> | ||
<label class="m-0" for="close">Closing Time | ||
<input class="ml-1" id="close" type="time" name="" value="00:00" data-opening-times-target="close"> | ||
</label> | ||
<label class="m-0" for="allDay">All Day | ||
<input class="ml-1" id="allDay" type="checkbox" name="" value="" data-opening-times-target="allDay" data-action="change->opening-times#allDay" > | ||
</label> | ||
<button data-action="click->opening-times#addOpeningTime" type="" class="btn btn-primary">Add</button> | ||
</div> | ||
|
||
<%= f.text_area :opening_times, data: { opening_times_target: "textarea" }, hidden: true %> | ||
</div> |