Pman.Dialog.XtupleCustomer.js
"|xns": "Roo.form",
"items": [
{
- "fieldLabel": "Customer #",
- "name": "cust_number",
- "readOnly": true,
- "width": 150,
+ "listeners": {
+ "keyup": "function (_self, e)\n{\n if (!(_this.form.findField('cust_id').getValue() * 1)) {\n \n _this.form.findField('cust_number').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n \n }\n}"
+ },
+ "fieldLabel": "Name",
+ "name": "cust_name",
+ "width": 300,
"xtype": "TextField",
"|xns": "Roo.form"
},
{
xtype: 'TextField',
xns: Roo.form,
- fieldLabel : 'Customer #',
- name : 'cust_number',
- readOnly : true,
- width : 150
+ listeners : {
+ keyup : function (_self, e)
+ {
+ if (!(_this.form.findField('cust_id').getValue() * 1)) {
+
+ _this.form.findField('cust_number').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
+
+ }
+ }
+ },
+ fieldLabel : 'Name',
+ name : 'cust_name',
+ width : 300
},
{
xtype: 'TextField',