[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH] 086 Fixed problem when attributes_widget was displaying empty option



Attribute table was modified to skip creation of option for empty value.

https://fedorahosted.org/freeipa/ticket/2291
--
Petr Vobornik
From fb0df6e11f9d105e58ae6e08c15ff270f8c2206a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Wed, 15 Feb 2012 17:47:53 +0100
Subject: [PATCH] Fixed problem when attributes_widget was displaying empty
 option

Attribute table was modified to skip creation of option for empty value.

https://fedorahosted.org/freeipa/ticket/2291
---
 install/ui/aci.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index fc72b51929e94bb73dae5c01b6e1ecf50b6e8303..02e03f309f279d62f411e3b9ffd8bae9fe09dc06 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -487,7 +487,12 @@ IPA.attributes_widget = function(spec) {
 
         values = values || [];
         for (var i=0; i<values.length; i++) {
-            var value = values[i].toLowerCase();
+
+            var value = values[i];
+
+            if (!value || value === '') continue;
+
+            value = value.toLowerCase();
             that.values.push(value);
         }
 
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]