Commits

Mikhail Korobov committed 89ca353

Fixed a bug with underscored fields

Comments (0)

Files changed (1)

generic_images/media/generic_images/js/AttachedImageInline.js

     cleanupFields: function(fields){
         var cleanedFields = {};
         var self = this;
+        var denied_names = ['_save', '_addanother', '_continue'];
         $each(fields, function(value, name){
-            if (name && name[0] != '_' && !self.isFormsetField(name))
+            if (name && !(name in denied_names) && !self.isFormsetField(name))
                 cleanedFields[name]=value;
         });
         return cleanedFields;