mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
WebUI: Add confirmation dialog for changing default user/host group
Changing default group on automember rules page is too easy. Add a confirmation dialog to avoid misclick in the case. Ticket: https://pagure.io/freeipa/issue/8322 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
parent
8de73c1590
commit
33ca074558
@ -601,11 +601,22 @@ IPA.automember.default_group_widget = function(spec) {
|
||||
|
||||
if (group === that.group) return;
|
||||
|
||||
var dialog = IPA.confirm_dialog({
|
||||
title: that.get_title(),
|
||||
message: text.get('@i18n:objects.automember.default_group_confirm'),
|
||||
on_ok: function() {
|
||||
if (group === '') {
|
||||
that.remove_default_group();
|
||||
} else {
|
||||
that.set_default_group(group);
|
||||
}
|
||||
},
|
||||
on_cancel: function() {
|
||||
that.group_select.update([that.group]);
|
||||
}
|
||||
});
|
||||
|
||||
dialog.open();
|
||||
};
|
||||
|
||||
that.load = function(data) {
|
||||
|
@ -522,6 +522,9 @@ class i18n_messages(Command):
|
||||
"Add exclusive condition into '${primary_key}'"
|
||||
),
|
||||
"attribute": _("Attribute"),
|
||||
"default_group_confirm": _(
|
||||
"Are you sure you want to change default group?"
|
||||
),
|
||||
"default_host_group": _("Default host group"),
|
||||
"default_user_group": _("Default user group"),
|
||||
"exclusive": _("Exclusive"),
|
||||
|
Loading…
Reference in New Issue
Block a user