ui: Move the Role remove dialog to use InformedAction (#11298)
This commit is contained in:
parent
88bd33cc6b
commit
ae57fe6e1d
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
ui: Fixed styling of Role remove dialog on the Token edit page
|
||||||
|
```
|
|
@ -141,24 +141,35 @@ as |modal|>
|
||||||
<li role="none" class="dangerous">
|
<li role="none" class="dangerous">
|
||||||
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Remove</label>
|
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Remove</label>
|
||||||
<div role="menu">
|
<div role="menu">
|
||||||
<div class="confirmation-alert warning">
|
<InformedAction
|
||||||
<div>
|
class="warning"
|
||||||
<header>
|
>
|
||||||
Confirm Remove
|
<:header>
|
||||||
</header>
|
Confirm Remove
|
||||||
|
</:header>
|
||||||
|
<:body>
|
||||||
<p>
|
<p>
|
||||||
Are you sure you want to remove this role?
|
Are you sure you want to remove this role?
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</:body>
|
||||||
<ul>
|
<:actions as |Actions|>
|
||||||
<li class="dangerous">
|
<Actions.Action class="dangerous">
|
||||||
<button tabindex="-1" type="button" class="type-delete" onclick={{action send 'remove' item items}}>Remove</button>
|
<Action
|
||||||
</li>
|
tabindex="-1"
|
||||||
<li>
|
{{on 'click' (action send 'remove' item items)}}
|
||||||
<label for={{confirm}}>Cancel</label>
|
>
|
||||||
</li>
|
Remove
|
||||||
</ul>
|
</Action>
|
||||||
</div>
|
</Actions.Action>
|
||||||
|
<Actions.Action>
|
||||||
|
<Action
|
||||||
|
@for={{confirm}}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Action>
|
||||||
|
</Actions.Action>
|
||||||
|
</:actions>
|
||||||
|
</InformedAction>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -6,9 +6,11 @@ export default (clickable, deletable, collection, alias, roleForm) => (scope = '
|
||||||
roles: alias('selectedOptions'),
|
roles: alias('selectedOptions'),
|
||||||
selectedOptions: collection(
|
selectedOptions: collection(
|
||||||
'[data-test-roles] [data-test-tabular-row]',
|
'[data-test-roles] [data-test-tabular-row]',
|
||||||
deletable({
|
{
|
||||||
actions: clickable('label'),
|
actions: clickable('label > button'),
|
||||||
})
|
delete: clickable('[data-test-delete]'),
|
||||||
|
confirmDelete: clickable('.informed-action button'),
|
||||||
|
}
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue