[open-ils-commits] r12171 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Feb 13 11:15:16 EST 2009


Author: erickson
Date: 2009-02-13 11:15:14 -0500 (Fri, 13 Feb 2009)
New Revision: 12171

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
don't display auto-generated fields in create dialog

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2009-02-13 16:14:40 UTC (rev 12170)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2009-02-13 16:15:14 UTC (rev 12171)
@@ -44,6 +44,9 @@
                     var field = this.sortedFieldList[f];
                     if(!field || field.virtual) continue;
 
+                    if(field.name == this.fmIDL.pkey && this.mode == 'create' && this.fmIDL.pkey_sequence)
+                        continue; /* don't show auto-generated fields on create */
+
                     var row = document.createElement('tr');
                     var nameTd = document.createElement('td');
                     var valTd = document.createElement('td');
@@ -137,7 +140,7 @@
                 for(var idx in fields)  
                     this.fmObject[fields[idx]](this.getFieldValue(fields[idx]));
                 if(this.mode == 'create' && this.fmIDL.pkey_sequence)
-                    this.fmObject[fieldmapper[this.fmClass].Identifier](null);
+                    this.fmObject[this.fmIDL.pkey](null);
                 pcrud[this.mode](this.fmObject, opts);
             }
         }



More information about the open-ils-commits mailing list