background : true,
closable : false,
collapsible : false,
- height : 100,
+ height : 150,
modal : true,
resizable : false,
title : "Add / Edit Core Enum",
actioncomplete : function (_self, action)
{
if (action.type == 'setdata') {
- Roo.log(_this.data);
- if(typeof(_this.data.etype == 'undefined') || !_this.data.etype.length){
+
+ if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
Roo.MessageBox.alert('Error', 'Missing etype');
_this.dialog.hide();
return;
xtype: 'TextField',
xns: Roo.form,
allowBlank : false,
- fieldLabel : 'Industry Name',
+ fieldLabel : 'Display Name',
name : 'display_name',
width : 200
},
{
- xtype: 'Hidden',
+ xtype: 'Checkbox',
xns: Roo.form,
- name : 'etype'
+ boxLabel : 'Yes/No',
+ fieldLabel : 'Is shown on site?',
+ inputValue : 1,
+ name : 'visible',
+ value : 0,
+ valueOff : 0
},
{
xtype: 'Hidden',
xns: Roo.form,
- name : 'active',
- value : 1
+ name : 'etype'
},
{
xtype: 'Hidden',
listeners : {
click : function() {
- var name = _this.form.findField('display_name').getValue();
+ var name = _this.form.findField('name').getValue();
name = name.toUpperCase().replace(/[^A-Z]+/g, '');
if (!name.length) {
Roo.MessageBox.alert("Error","Please fill in a valid name");
return;
}
_this.form.findField('name').setValue(name);
-
_this.form.doAction('submit');