1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.CoreEnum = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
34 show : function (_self)
45 title : "Add / Edit Core Enum",
49 xtype: 'ContentPanel',
59 actioncomplete : function (_self, action)
61 if (action.type == 'setdata') {
63 if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
64 Roo.MessageBox.alert('Error', 'Missing etype');
70 _this.dialog.el.mask("Loading");
71 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
76 if (action.type == 'load') {
77 _this.dialog.el.unmask();
80 if (action.type == 'submit' ) {
81 _this.dialog.el.unmask();
85 _this.callback.call(_this, action.result.data);
90 rendered : function (form)
96 style : 'margin: 5px',
97 url : baseURL + '/Roo/core_enum.php',
111 fieldLabel : 'Industry Name',
112 name : 'display_name',
143 xtype: 'LayoutRegion',
165 var name = _this.form.findField('display_name').getValue();
166 name = name.toUpperCase().replace(/[^A-Z]+/g, '');
168 Roo.MessageBox.alert("Error","Please fill in a valid name");
171 _this.form.findField('name').setValue(name);
174 _this.form.doAction('submit');