[27336] Confirm closing the meeting

Avoids losing data when accidentally clicking the button.
pull/6827/head
Oliver Günther 7 years ago
parent e015ca555d
commit f6e325b533
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 3
      app/helpers/meeting_contents_helper.rb
  2. 1
      config/locales/en.yml
  3. 1
      features/meeting_close.feature

@ -60,7 +60,8 @@ module MeetingContentsHelper
action: 'close', action: 'close',
meeting_id: meeting }, meeting_id: meeting },
method: :put, method: :put,
class: 'button icon-context icon-locked' data: { confirm: I18n.t(:text_meeting_closing_are_you_sure) },
class: 'meetings--close-meeting-button button icon-context icon-locked'
end end
when 'meeting_minutes' when 'meeting_minutes'
content_tag :li, '', class: 'toolbar-item' do content_tag :li, '', class: 'toolbar-item' do

@ -85,6 +85,7 @@ en:
text_duration_in_hours: "Duration in hours" text_duration_in_hours: "Duration in hours"
text_in_hours: "in hours" text_in_hours: "in hours"
text_meeting_agenda_for_meeting: 'agenda for the meeting "%{meeting}"' text_meeting_agenda_for_meeting: 'agenda for the meeting "%{meeting}"'
text_meeting_closing_are_you_sure: "Are you sure you want to close the meeting?"
text_meeting_agenda_open_are_you_sure: "Unsaved content in the minutes will be lost! Continue?" text_meeting_agenda_open_are_you_sure: "Unsaved content in the minutes will be lost! Continue?"
text_meeting_minutes_for_meeting: 'minutes for the meeting "%{meeting}"' text_meeting_minutes_for_meeting: 'minutes for the meeting "%{meeting}"'
text_review_meeting_agenda: "%{author} has put the %{link} up for review." text_review_meeting_agenda: "%{author} has put the %{link} up for review."

@ -66,6 +66,7 @@ Feature: Close and open meeting agendas
When I am already logged in as "alice" When I am already logged in as "alice"
And I go to the show page of the meeting called "Bobs Meeting" And I go to the show page of the meeting called "Bobs Meeting"
And I follow "Close" within ".meeting_agenda" And I follow "Close" within ".meeting_agenda"
And I confirm the JS confirm dialog
Then I should be on the show page of the meeting called "Bobs Meeting" Then I should be on the show page of the meeting called "Bobs Meeting"
And the minutes should contain the following text: And the minutes should contain the following text:

Loading…
Cancel
Save