Skip to content

Commit 4cbf1e9

Browse files
authored
Merge pull request #5365 from rubyforgood/add-edit-button-to-org-page
Add edit button to top of /organization page
2 parents e550130 + 60d64c4 commit 4cbf1e9

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

app/views/organizations/_details.html.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<div class="row">
44
<div class="col-md-12">
55
<div class="card card-primary">
6+
<% if can_administrate? %>
7+
<div class="card-footer">
8+
<%= edit_button_to(edit_organization_path, {size: "md"}) %>
9+
</div>
10+
<% end %>
611

712
<div class="card-header">
813
<h2 class="card-title">Organization Info</h2>
154 KB
Loading
174 KB
Loading

spec/system/manage_system_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
end
2828

2929
it "can edit the properties for an organization as an admin" do
30-
click_on "Edit"
30+
click_on "Edit", match: :first
3131
fill_in "Name", with: "Something else"
3232
click_button "Save"
3333
expect(page).to have_content("pdated your organization")

spec/system/organization_system_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def post_form_submit
145145
expect(page).to have_content('Media Information')
146146
expect(organization.reload.partner_form_fields).to eq(['media_information'])
147147
# deselect previously chosen Required Partner Field
148-
click_on "Edit"
148+
click_on "Edit", match: :first
149149
unselect('Media Information', from: 'organization_partner_form_fields', visible: false)
150150
click_on "Save"
151151
expect(page).to_not have_content('Media Information')

0 commit comments

Comments
 (0)