From 8751b1a3dbb2a5a7bc9d984aeb5adb3be012c6f4 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 8 Feb 2013 13:05:17 +0100 Subject: Set pkeys to add,remove dialog https://fedorahosted.org/freeipa/ticket/3236 --- install/ui/src/freeipa/add.js | 7 ++++--- install/ui/src/freeipa/automount.js | 2 +- install/ui/src/freeipa/search.js | 30 ++++++++++++++---------------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js index a2b60435e..a91232887 100644 --- a/install/ui/src/freeipa/add.js +++ b/install/ui/src/freeipa/add.js @@ -38,6 +38,7 @@ IPA.entity_adder_dialog = function(spec) { that.command = null; that.added = IPA.observer(); that.subject = spec.subject || that.entity.metadata.label_singular; + that.pkey_prefix = spec.pkey_prefix || []; that.show_edit_page = spec.show_edit_page || show_edit_page; @@ -127,9 +128,9 @@ IPA.entity_adder_dialog = function(spec) { pkey = pkey[0]; } - var pkeys = that.facet.get_pkeys(); + var pkeys = that.pkey_prefix.slice(0); pkeys.push(pkey); - navigation.show_entity(that.entity.name, 'default', [pkeys]); + navigation.show_entity(that.entity.name, 'default', pkeys); } that.create_add_command = function(record) { @@ -142,7 +143,7 @@ IPA.entity_adder_dialog = function(spec) { retry: that.retry }); - command.add_args(that.entity.get_primary_key_prefix()); + command.add_args(that.pkey_prefix.slice(0)); var fields = that.fields.get_fields(); for (var j=0; j