diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-08 13:57:54 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-08 13:57:54 +0300 |
| commit | 74217f753f4f4f6d882af651ccb4ef88ed5c87d4 (patch) | |
| tree | c2a6827dd191a480eec45fc3aa396b3e5745889e /app/views/projects/edit.html.haml | |
| parent | 9021debf50d979fc7d62ece432a0071c10e6868e (diff) | |
| download | gitlab-ce-74217f753f4f4f6d882af651ccb4ef88ed5c87d4.tar.gz | |
Apply ConfirmDangerModal for project transfer/remove actions
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/edit.html.haml')
| -rw-r--r-- | app/views/projects/edit.html.haml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index cff31e7ee92..160db904341 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -104,7 +104,7 @@ %strong Once active this project shows up in the search and on the dashboard. = link_to 'Unarchive', unarchive_project_path(@project), data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be committed to again." }, - method: :post, class: "btn btn-remove" + method: :post, class: "btn btn-success" - else %p Archiving the project will mark its repository as read-only. @@ -154,7 +154,7 @@ %li You can only transfer the project to namespaces you manage. %li You will need to update your local repositories to point to the new location. .form-actions - = f.submit 'Transfer', class: "btn btn-remove" + = f.submit 'Transfer', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) } - else .nothing-here-block Only the project owner can transfer a project @@ -162,12 +162,13 @@ .panel.panel-default.panel.panel-danger .panel-heading Remove project .panel-body - %p - Removing the project will delete its repository and all related resources including issues, merge requests etc. - %br - %strong Removed projects cannot be restored! + = form_tag(project_path(@project), method: :delete, html: { class: 'form-horizontal'}) do + %p + Removing the project will delete its repository and all related resources including issues, merge requests etc. + %br + %strong Removed projects cannot be restored! - = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove" + = link_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } - else .nothing-here-block Only project owner can remove a project @@ -177,3 +178,6 @@ %i.fa.fa-spinner.fa-spin Saving project. %p Please wait a moment, this page will automatically refresh when ready. + + += render 'shared/confirm_modal', phrase: @project.path |
