-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MKT-575] Prevent accidental deletion in points (#310)
* [MKT-575] Prevent accidental deletion in points https://ombulabs.atlassian.net/browse/MKT-575 * added spec for checking destroy when title does not match --------- Co-authored-by: rishijain <[email protected]>
- Loading branch information
Showing
8 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<%= form_with(model: project, method: :delete) do |f| %> | ||
This action cannot be undone. | ||
This will permanently delete the <strong><%= project.title %></strong> project, | ||
stories, and associated estimations. | ||
|
||
<div class="field"> | ||
<%= f.label :title, raw("Please type <strong>#{project.title}</strong> to confirm.") %> | ||
<%= f.text_field :title, value: "", placeholder: "Project's title", autofocus: true, required: true %> | ||
</div> | ||
|
||
<%= f.submit "I understand the consequences, delete this project", class: "button magenta" %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(function(){ | ||
showModal("Are you absolutely sure?", "<%= j(render('delete_form', project: @project)) %>") | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
patch :toggle_locked | ||
get :new_clone | ||
post :clone | ||
get :open_delete_modal | ||
end | ||
get :new_sub_project | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters