Skip to content
Snippets Groups Projects

Improve reservation length editing

Merged Michael Fairchild requested to merge time-improvements into master
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
+ 6
4
@@ -178,11 +178,13 @@ EIGHT_PM_MINUTES = 1200 # end time of calendar
@@ -178,11 +178,13 @@ EIGHT_PM_MINUTES = 1200 # end time of calendar
</select>
</select>
<% else resource.minutes_per_reservation.nil? %>
<% else resource.minutes_per_reservation.nil? %>
<select id="reservation-length" name="length">
<select id="reservation-length" name="length">
<% (1..4).each do |i| %>
<% (1..3).each do |i| %>
<option value="<%=i*15%>"><%=i*15%> minutes</option>
<% min = i*15 %>
 
<option value="<%=min%>" <%= (!reservation.nil? && reservation.length == min)? "selected" : "" %>><%=min%> minutes</option>
<% end %>
<% end %>
<option value="90">1.5 hours</option>
<option value="60" <%= (reservation.nil? || reservation.length == 60)? "selected" : "" %>>1 hour</option>
<option value="120">2 hours</option>
<option value="90" <%= (!reservation.nil? && reservation.length == 90)? "selected" : "" %>>1.5 hours</option>
 
<option value="120" <%= (!reservation.nil? && reservation.length == 120)? "selected" : "" %>>2 hours</option>
</select>
</select>
<% end %>
<% end %>
<label for="title">Name of Reservation: (e.g. "Group Meeting")</label>
<label for="title">Name of Reservation: (e.g. "Group Meeting")</label>
Loading