Pman.Dialog.CoreEnum.bjs
[Pman.Core] / Pman.Dialog.CoreEnum.js
index c4080b4..543c71c 100644 (file)
@@ -59,6 +59,12 @@ Pman.Dialog.CoreEnum = {
                                 actioncomplete : function (_self, action)
                                 {
                                   if (action.type == 'setdata') {
+                                        
+                                        if(typeof(_this.data.etype == 'undefined') || !_this.data.etype.length){
+                                            Roo.MessageBox.alert('Error', 'Missing etype');
+                                            return;
+                                        }
+                                  
                                         if(_this.data.id){
                                             _this.dialog.el.mask("Loading");
                                             this.load({ method: 'GET', params: { '_id' : _this.data.id }}); 
@@ -105,6 +111,23 @@ Pman.Dialog.CoreEnum = {
                                     name : 'display_name',
                                     width : 200
                                 },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'etype'
+                                },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'active',
+                                    value : 1
+                                },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'seqid',
+                                    value : 0
+                                },
                                 {
                                     xtype: 'Hidden',
                                     xns: Roo.form,
@@ -124,13 +147,13 @@ Pman.Dialog.CoreEnum = {
                 {
                     xtype: 'Button',
                     xns: Roo,
-                    text : "Cancel",
                     listeners : {
                         click : function() {
                             _this.form.reset();
                             _this.dialog.hide();
                         }
-                    }
+                    },
+                    text : "Cancel"
                 },
                 {
                     xtype: 'Button',