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

[Freeipa-devel] [PATCH] 105 Fixed checkbox value in table without pkey



When a table is displaying a record set without entity's pkey attribute. A checkbox value isn't properly prepared. This patch adds the preparation (converts value to string).

https://fedorahosted.org/freeipa/ticket/2404
--
Petr Vobornik
From a17c947f05597ed43a614b4a9fa3368b14bb6fa4 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvoborni redhat com>
Date: Thu, 8 Mar 2012 10:37:28 +0100
Subject: [PATCH] Fixed checkbox value in table without pkey

When a table is displaying a record set without entity's pkey attribute. A checkbox value isn't properly prepared. This patch adds the preparation (converts value to string).

https://fedorahosted.org/freeipa/ticket/2404
---
 install/ui/widget.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/install/ui/widget.js b/install/ui/widget.js
index f906d165c6202b3e2b54b9299cfcafed9bccb0e4..d46bbd8aaf919ed6c52bc90f8b9fff0b49dce797 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -1615,6 +1615,7 @@ IPA.table_widget = function (spec) {
 
         if (!select_set) {
             value = record[that.value_attr_name];
+            value = value ? value.toString() : '';
             $('input[name="'+that.name+'"]', tr).val(value);
         }
 
-- 
1.7.7.6


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