On 11/03/2010 08:33 AM, Endi Sukma Dewata wrote:
On 11/1/2010 12:58 PM, Adam Young wrote:
For the 'add and add again' useage.

NACK. The following for-loop shouldn't be moved into add_win() because it breaks the service add dialog.

-        for (var i = 0; i < that.fields.length; ++i) {
-            var field = that.fields[i];
-            if (field.setup) {
-                var value = field.setup(dialog, IPA_ADD_UPDATE);
-                if (value != null) {
-                    if (field.name == pkey_name)
-                        pkey = [value];
-                    else
+            for (var i = 0; i < that.fields.length; ++i) {
+                var field = that.fields[i];
+                if (field.setup) {
+                    var value = field.setup(dialog, IPA_ADD_UPDATE);
+                    if (value != null) {
+                        if (field.name == pkey_name)
+                            pkey = [value];
+                    } else {
                         options[field.name] = value;
+                    }
                 }
             }

I suspect then that the service add dialog is wrong. This behaviour has been spec'ed and working for a long time. What does it break?

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

Reply via email to