Commit 1160a4e3 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Kamil Trzciński

Add modal for deleting feature flags

parent 8fa1d249
.modal{ id: "delete-feature-flag-modal-#{feature_flag.id}",
tabindex: -1,
role: 'dialog' }
.modal-dialog{ role: 'document' }
.modal-content
.modal-header
%h5.modal-title
= s_('FeatureFlags|Delete feature flag?')
%button.close{ type: 'button', data: { dismiss: 'modal' }, aria: { label: _('Close') } }
%span{ "aria-hidden": true } ×
.modal-body
%p
= s_('FeatureFlags|Feature flag %{feature_flag_name} will be removed. Are you sure?') % { feature_flag_name: feature_flag.name }
.modal-footer
%button{ type: 'button', data: { dismiss: 'modal' }, class: 'btn btn-default' } Cancel
= button_to 'Delete',
project_feature_flag_path(@project, feature_flag),
title: 'Delete',
method: :delete,
class: 'btn btn-remove'
......@@ -14,8 +14,10 @@
= feature_flag.name
%div.controls.d-none.d-md-block
= render 'delete_feature_flag_modal', { feature_flag: feature_flag }
= link_to 'Edit', edit_project_feature_flag_path(@project, feature_flag), class: "btn btn-sm btn-grouped"
= link_to 'Remove', project_feature_flag_path(@project, feature_flag), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
%button.btn.btn-remove.btn-sm.btn-grouped{ type: 'button', data: { toggle: 'modal', target: "#delete-feature-flag-modal-#{feature_flag.id}" } }
Remove
%p
- if feature_flag.active?
......
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