diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-09-27 09:28:14 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-10-05 14:51:50 +0200 |
commit | fe8aeef30773739fe7b17e3c152be5ce858ef9f6 (patch) | |
tree | c56212d6214a62f3fb81114e0bb77fac4b10d552 /install/ui/add.js | |
parent | f93d71409aa78c4e5c860405cdcc3bc6ffc49280 (diff) | |
download | freeipa-fe8aeef30773739fe7b17e3c152be5ce858ef9f6.tar.gz freeipa-fe8aeef30773739fe7b17e3c152be5ce858ef9f6.tar.xz freeipa-fe8aeef30773739fe7b17e3c152be5ce858ef9f6.zip |
Added confirmation when adding multiple entries.
The adder dialog has been modified to show a confirmation message
after each successful addition.
Ticket #1786
Diffstat (limited to 'install/ui/add.js')
-rw-r--r-- | install/ui/add.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/install/ui/add.js b/install/ui/add.js index 5a4537ba3..17418aaba 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -115,6 +115,7 @@ IPA.add_dialog = function (spec) { name: 'add', label: IPA.messages.buttons.add, click: function() { + that.hide_message(); that.add( function(data, text_status, xhr) { var facet = IPA.current_entity.get_facet(); @@ -130,8 +131,14 @@ IPA.add_dialog = function (spec) { name: 'add_and_add_another', label: IPA.messages.buttons.add_and_add_another, click: function() { + that.hide_message(); that.add( function(data, text_status, xhr) { + var label = that.entity.metadata.label_singular; + var message = IPA.messages.dialogs.add_confirmation; + message = message.replace('${entity}', label); + that.show_message(message); + var facet = IPA.current_entity.get_facet(); var table = facet.table; table.refresh(); @@ -145,6 +152,7 @@ IPA.add_dialog = function (spec) { name: 'add_and_edit', label: IPA.messages.buttons.add_and_edit, click: function() { + that.hide_message(); that.add( function(data, text_status, xhr) { that.close(); @@ -159,6 +167,7 @@ IPA.add_dialog = function (spec) { name: 'cancel', label: IPA.messages.buttons.cancel, click: function() { + that.hide_message(); that.close(); } }); |