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)
- confirm_phrase = s_('DeleteProject|Delete %{name}') % { name: project.full_name }
.sub-section
%h4.danger-title= _('Delete project')
......@@ -7,4 +6,4 @@
%strong= _('Deleting the project will delete its repository and all related resources including issues, merge requests etc.')
%p
%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 @@
- 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')
- 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?
.sub-section
......@@ -20,7 +19,7 @@
%p= permanent_delete_message(project)
%p
%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
= render 'projects/settings/restore', project: project
......@@ -8810,9 +8810,6 @@ msgstr ""
msgid "Delete variable"
msgstr ""
msgid "DeleteProject|Delete %{name}"
msgstr ""
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgstr ""
......
......@@ -279,7 +279,7 @@ RSpec.describe 'Project' do
end
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(Project.all.count).to be_zero
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