Commit be671e8e authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch...

Merge branch '255970-confirmation-panels-for-significant-actions-are-inconsistent-in-text-to-type-in' into 'master'

Resolve "Confirmation panels for significant actions are inconsistent in text to type in"

See merge request gitlab-org/gitlab!47117
parents caf5255a 442887f4
- return unless can?(current_user, :remove_project, project) - return unless can?(current_user, :remove_project, project)
- confirm_phrase = s_('DeleteProject|Delete %{name}') % { name: project.full_name }
.sub-section .sub-section
%h4.danger-title= _('Delete project') %h4.danger-title= _('Delete project')
...@@ -7,4 +6,4 @@ ...@@ -7,4 +6,4 @@
%strong= _('Deleting the project will delete its repository and all related resources including issues, merge requests etc.') %strong= _('Deleting the project will delete its repository and all related resources including issues, merge requests etc.')
%p %p
%strong= _('Deleted projects cannot be restored!') %strong= _('Deleted projects cannot be restored!')
#js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: confirm_phrase } } #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: project.path } }
---
title: Make delete repo prompts consistent
merge_request: 47117
author:
type: fixed
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
- adjourned_date = adjourned_deletion ? permanent_deletion_date(Time.now.utc).to_s : nil; - adjourned_date = adjourned_deletion ? permanent_deletion_date(Time.now.utc).to_s : nil;
- admin_help_path = help_page_path('user/admin_area/settings/visibility_and_access_controls', anchor: 'default-deletion-delay') - admin_help_path = help_page_path('user/admin_area/settings/visibility_and_access_controls', anchor: 'default-deletion-delay')
- recovery_help_path = help_page_path('user/project/settings/index', anchor: 'delete-a-project') - recovery_help_path = help_page_path('user/project/settings/index', anchor: 'delete-a-project')
- confirm_phrase = s_('DeleteProject|Delete %{name}') % { name: project.full_name }
- unless project.marked_for_deletion? - unless project.marked_for_deletion?
.sub-section .sub-section
...@@ -20,7 +19,7 @@ ...@@ -20,7 +19,7 @@
%p= permanent_delete_message(project) %p= permanent_delete_message(project)
%p %p
%strong= _('Are you ABSOLUTELY SURE you wish to delete this project?') %strong= _('Are you ABSOLUTELY SURE you wish to delete this project?')
#js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: confirm_phrase } } #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: project.path } }
- else - else
= render 'projects/settings/restore', project: project = render 'projects/settings/restore', project: project
...@@ -8810,9 +8810,6 @@ msgstr "" ...@@ -8810,9 +8810,6 @@ msgstr ""
msgid "Delete variable" msgid "Delete variable"
msgstr "" msgstr ""
msgid "DeleteProject|Delete %{name}"
msgstr ""
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator." msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgstr "" msgstr ""
......
...@@ -279,7 +279,7 @@ RSpec.describe 'Project' do ...@@ -279,7 +279,7 @@ RSpec.describe 'Project' do
end end
it 'deletes a project', :sidekiq_might_not_need_inline do it 'deletes a project', :sidekiq_might_not_need_inline do
expect { remove_with_confirm('Delete project', "Delete #{project.full_name}", 'Yes, delete project') }.to change { Project.count }.by(-1) expect { remove_with_confirm('Delete project', project.path, 'Yes, delete project') }.to change { Project.count }.by(-1)
expect(page).to have_content "Project '#{project.full_name}' is in the process of being deleted." expect(page).to have_content "Project '#{project.full_name}' is in the process of being deleted."
expect(Project.all.count).to be_zero expect(Project.all.count).to be_zero
expect(project.issues).to be_empty expect(project.issues).to be_empty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment