From 9a2d9dc30c0c373a75c5199818db4c4f98b3185f Mon Sep 17 00:00:00 2001
From: Adam Young <[email protected]>
Date: Thu, 30 Jun 2011 13:45:35 -0400
Subject: [PATCH] config widgets entity select default group checkbox for
 migration

---
 install/ui/serverconfig.js |   11 +++++++++--
 install/ui/widget.js       |    7 +++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/install/ui/serverconfig.js b/install/ui/serverconfig.js
index 5707d5d71906d5f6502c1576f534185240630aca..9779dccaec84aecbf26270c5c3fa87f35f6edacd 100644
--- a/install/ui/serverconfig.js
+++ b/install/ui/serverconfig.js
@@ -48,12 +48,19 @@ IPA.entity_factories.config = function(){
                     fields:[
                         'ipausersearchfields',
                         'ipadefaultemaildomain',
-                        'ipadefaultprimarygroup',
+                        {
+                            factory:IPA.entity_select_widget,
+                            name: 'ipadefaultprimarygroup',
+                            entity: 'group'
+                        },
                         'ipahomesrootdir',
                         'ipamaxusernamelength',
-                        'ipamigrationenabled',
                         'ipapwdexpadvnotify',
                         {
+                            factory: IPA.checkbox_widget,
+                            name: 'ipamigrationenabled'
+                        },
+                        {
                             factory: IPA.multivalued_text_widget,
                             name: 'ipauserobjectclasses'
                         }
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 5277389eddf1dddb3ec5f218d7021757f9eb06eb..d71648e32884cce589c177274d20efadb748ef0d 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -788,6 +788,13 @@ IPA.checkbox_widget = function (spec) {
 
     that.update = function() {
         var value = that.values && that.values.length ? that.values[0] : false;
+        if (value ==="FALSE"){
+            value = false;
+        }
+        if (value ==="TRUE"){
+            value = true;
+        }
+
         $('input[name="'+that.name+'"]', that.container).get(0).checked = value;
     };
 
-- 
1.7.5.2

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to