skips undefined fields in UserProfilePanel
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 11 Feb 2015 11:38:47 +0000 (12:38 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 11 Feb 2015 14:18:57 +0000 (15:18 +0100)
Change-Id: I95f664a8788ea51cf91989cd0b6ae2633265f8d2
Reviewed-on: http://gerrit.tine20.com/customers/1642
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/js/UserProfilePanel.js

index d618d81..540fdf4 100644 (file)
@@ -48,7 +48,11 @@ Tine.Tinebase.UserProfilePanel = Ext.extend(Ext.Panel, {
             // don't display generic fields
             var fieldDefinition = Tine.Addressbook.Model.Contact.getField(fieldName);
             
-            switch(fieldName) {
+            if (! fieldDefinition) {
+                return;
+            }
+            
+            switch (fieldName) {
                 default: 
                     this.add(new Ext.form.TextField({
                         hidden: this.genericFields.indexOf(fieldName) >= 0,