From 31eebda584d556454104a8fbf26974b6b49d9589 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 29 Feb 2012 18:53:11 +0100 Subject: Removed CSV creation from UI Creating CSV values in UI is unnecessary and error-prone because server converts them back to list. Possible problems with values containing commas may occur. All occurrences of CSV joining were therefore removed. https://fedorahosted.org/freeipa/ticket/2227 --- install/ui/add.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'install/ui/add.js') diff --git a/install/ui/add.js b/install/ui/add.js index 9b473ccc..671d3f1f 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -123,16 +123,14 @@ IPA.entity_adder_dialog = function(spec) { var field = fields[j]; var values = record[field.param]; - if (!values) continue; - - // TODO: Handle multi-valued attributes like in detail facet's update() - var value = values.join(','); - if (!value) continue; + if (!values || values.length === 0) continue; if (field.param === pkey_name) { - command.add_arg(value); + command.add_arg(values[0]); + } else if (values.length === 1) { + command.set_option(field.param, values[0]); } else { - command.set_option(field.param, value); + command.set_option(field.param, values); } } -- cgit