Skip to content

Commit

Permalink
Got'em last two brs
Browse files Browse the repository at this point in the history
  • Loading branch information
invacuo committed Oct 17, 2017
1 parent 289287e commit d859aa7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions app/views/wishlists/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,27 @@
</div>

<%= form.fields_for :user do |user_form| %>
<div class="form-group" id="wishlist_users">

<p>
<strong>Admins:</strong> (can manage all wishlists)
<div class="form-group" id="wishlist-admins">
<strong>Admins:</strong> (can manage all wishlists)
<div>
<% User.admin.each do |admin| %>
<input type="checkbox" checked disabled readonly />
<%= admin.display_name %>
<% end %>
</p>
</div>
</div>

<p>
<strong>Site Managers:</strong><br />
<%= form.collection_check_boxes :user_ids, User.all, :id, :display_name do |b|
<div class="form-group" id="wishlist-site-managers">
<strong>Site Managers:</strong>
<div>
<%=
form.collection_check_boxes :user_ids, User.all, :id, :display_name do |b|
b.label(class: "checkbox-inline") {
b.check_box(id: "user-#{b.object.id}") + b.text
}
end
%>
<br />
%>
</div>
</p>
</div>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions spec/features/managing_items_and_wishlists_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
visit new_wishlist_path

fill_in "wishlist_name", with: "VA General"
within "#wishlist_users" do
within "#wishlist-site-managers" do
check "user-#{u.id}"
end
click_button "Create Wishlist"
Expand All @@ -151,7 +151,7 @@
click_link "DC General"
click_link "Edit Wishlist"

within "#wishlist_users" do
within "#wishlist-site-managers" do
check "user-#{u.id}"
end
click_button "Update Wishlist"
Expand Down

0 comments on commit d859aa7

Please sign in to comment.