{
xtype: 'ComboBox',
xns: Roo.form,
+ listeners : {
+ select : function (combo, record, index)
+ {
+ Roo.log(record);
+ /*
+ (function() {
+ combo.setValue('');
+ }).defer(100);
+ */
+ _this.form.findField('bodytext').setValue(record.data.content);
+
+ }
+ },
allowBlank : true,
alwaysQuery : true,
- displayField : 'name',
+ displayField : 'file',
editable : false,
emptyText : "Select Template",
fieldLabel : 'Template',
pageSize : 20,
qtip : "Select Template",
selectOnFocus : true,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{file}</b> </div>',
triggerAction : 'all',
typeAhead : true,
- valueField : 'name',
+ valueField : 'file',
width : 200,
store : {
xtype: 'Store',
}
},
remoteSort : true,
- sortInfo : { direction : 'DESC', field: 'name' },
+ sortInfo : { direction : 'DESC', field: 'file' },
proxy : {
xtype: 'HttpProxy',
xns: Roo.data,
id : 'name',
root : 'data',
totalProperty : 'total',
- fields : [{"name":"name","type":"string"},{"name":"body","type":"string"}]
+ fields : [{"name":"file","type":"string"},{"name":"content","type":"string"}]
}
}
},
var id = _this.form.findField('id').getValue() * 1;
if (!id) {
- Roo.MessageBox.alert("Error", "Save press release first");
+ Roo.MessageBox.alert("Error", "Save email template first");
return false;
}
o.params.onid = id
- o.params.ontable = 'crm_mailing_list_message';
+ o.params.ontable = 'core_mailing_list_message';
// o.params.imgtype = 'PressRelease';
//o.params['query[imagesize]'] = '150x150';