mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Confirm association dialogs by enter
Support for confirm mixin in association dialog. https://fedorahosted.org/freeipa/ticket/3200
This commit is contained in:
@@ -350,6 +350,8 @@ IPA.adder_dialog = function(spec) {
|
||||
|
||||
var that = IPA.dialog(spec);
|
||||
|
||||
IPA.confirm_mixin().apply(that);
|
||||
|
||||
that.external = spec.external;
|
||||
that.width = spec.width || 600;
|
||||
that.height = spec.height || 360;
|
||||
@@ -428,7 +430,13 @@ IPA.adder_dialog = function(spec) {
|
||||
|
||||
$('<input/>', {
|
||||
type: 'text',
|
||||
name: 'filter'
|
||||
name: 'filter',
|
||||
keyup: function(event) {
|
||||
if (event.keyCode === $.ui.keyCode.ENTER) {
|
||||
that.search();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}).appendTo(top_panel);
|
||||
|
||||
top_panel.append(' ');
|
||||
@@ -606,6 +614,14 @@ IPA.adder_dialog = function(spec) {
|
||||
that.execute = function() {
|
||||
};
|
||||
|
||||
that.on_confirm = function() {
|
||||
|
||||
var add_button = that.get_button('add');
|
||||
if (add_button.is_enabled()) {
|
||||
that.execute();
|
||||
}
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
that.adder_dialog_create = that.create;
|
||||
|
||||
Reference in New Issue
Block a user