On 8/19/2011 7:04 AM, Petr Vobornik wrote:
On 08/18/2011 04:53 PM, Endi Sukma Dewata wrote:
The 'Hide already enrolled' has been removed from the enrollment
dialog because it is checked by default and entries that are already
enrolled cannot be enrolled again.

Ticket #1638

ACK if leaving string in internal.py is the right thing to do when
deleting related label (the string isn't used anywhere else).

Nope :) Removed the label. Pushed to master and ipa-2-1.

--
Endi S. Dewata
From 6869131f2400e28d21b34575a2faa66d4dddb98f Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edew...@redhat.com>
Date: Wed, 17 Aug 2011 14:54:08 -0500
Subject: [PATCH] Removed 'Hide already enrolled' checkbox.

The 'Hide already enrolled' has been removed from the enrollment
dialog because it is checked by default and entries that are already
enrolled cannot be enrolled again.

Ticket #1638
---
 install/ui/association.js          |   36 ++++++++++++++++--------------------
 install/ui/dialog.js               |   14 --------------
 install/ui/test/data/ipa_init.json |    1 -
 ipalib/plugins/internal.py         |    1 -
 4 files changed, 16 insertions(+), 36 deletions(-)

diff --git a/install/ui/association.js b/install/ui/association.js
index 2c6a1d2003be0668b61b230b8317263b06a822a5..37bc95fda5a7a5339db179f2bf185faac6875571 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -176,28 +176,24 @@ IPA.association_adder_dialog = function (spec) {
             }
         }
 
-        var hide_checkbox = $('input[name=hidememb]', that.container);
+        var options = { all: true };
+        var relationships = IPA.metadata.objects[that.other_entity].relationships;
 
-        var options = {'all': true};
-        if (hide_checkbox.attr('checked')) {
-            var relationships = IPA.metadata.objects[that.other_entity].relationships;
+        /* TODO: better generic handling of different relationships! */
+        var other_attribute_member = '';
+        if (that.attribute_member == 'member')
+            other_attribute_member = 'memberof';
+        else if (that.attribute_member == 'memberuser')
+            other_attribute_member = 'memberof';
+        else if (that.attribute_member == 'memberhost')
+            other_attribute_member = 'memberof';
+        else if (that.attribute_member == 'memberof')
+            other_attribute_member = 'member';
 
-            /* TODO: better generic handling of different relationships! */
-            var other_attribute_member = '';
-            if (that.attribute_member == 'member')
-                other_attribute_member = 'memberof';
-            else if (that.attribute_member == 'memberuser')
-                other_attribute_member = 'memberof';
-            else if (that.attribute_member == 'memberhost')
-                other_attribute_member = 'memberof';
-            else if (that.attribute_member == 'memberof')
-                other_attribute_member = 'member';
-
-            var relationship = relationships[other_attribute_member];
-            if (relationship) {
-                var param_name = relationship[2] + that.entity.name;
-                options[param_name] = that.pkey;
-            }
+        var relationship = relationships[other_attribute_member];
+        if (relationship) {
+            var param_name = relationship[2] + that.entity.name;
+            options[param_name] = that.pkey;
         }
 
         IPA.command({
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index 3513f0c17fc92a3a5bde3048293f5bebd294b5ea..45d306158bc09e1955c1c93eb5096b348b4b8232 100644
--- a/install/ui/dialog.js
+++ b/install/ui/dialog.js
@@ -394,20 +394,6 @@ IPA.adder_dialog = function (spec) {
             value: IPA.messages.buttons.find
         }).appendTo(top_panel);
 
-        $('<input/>', {
-            type: 'checkbox',
-            name: 'hidememb',
-            id: 'hidememb',
-            checked: 'checked',
-            style: 'margin-left: 5px; vertical-align: middle'
-        }).appendTo(top_panel);
-
-        $('<label/>', {
-            'for': 'hidememb',
-            text: IPA.messages.dialogs.hide_already_enrolled,
-            style: 'margin-left: 3px'
-        }).appendTo(top_panel);
-
         top_panel.append(IPA.create_network_spinner());
 
         var left_panel = $('<div/>', {
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index bd3255054745eb749ea768f2892727052e46f346..7820e1128a694e4ed73214506e07e3deabe53c4c 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -15885,7 +15885,6 @@
                         "confirmation": "Confirmation",
                         "dirty_message": "This page has unsaved changes. Please save or revert.",
                         "dirty_title": "Dirty",
-                        "hide_already_enrolled": "Hide already enrolled.",
                         "hide_details": "Hide details",
                         "prospective": "Prospective",
                         "remove_empty": "Select entries to be removed.",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 84d8fd3fa6f966c636ff46cdd4ff38e29a60957f..bffd7b53ec2b9576620ebe37876f67b19c325bc9 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -355,7 +355,6 @@ class i18n_messages(Command):
             "confirmation":_("Confirmation"),
             "dirty_message":_("This page has unsaved changes. Please save or revert."),
             "dirty_title":_("Dirty"),
-            "hide_already_enrolled":_("Hide already enrolled."),
             "hide_details":_("Hide details"),\
             "redirection":_("Redirection"),
             "remove_empty":_("Select entries to be removed."),
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to