rendered paste bodyExt.onReady(function(){
Ext.QuickTips.init();
var simple = new Ext.FormPanel({
frame:true,
labelWidth: 120,
title: 'Configuración básica',
width: 350,
defaultType: 'textfield',
items: [{
fieldLabel: 'Cliente',
name: 'first',
width:190,
allowBlank: false,
blankText: "Nombre descriptivo del cliente",
}, {
fieldLabel: 'Nombre cuenta',
name: 'first',
width:190,
allowBlank: false,
blankText: "Cuenta asociadad el cliente (minusculas, sin espacios ni cosas raras)"
}, {
fieldLabel: 'Puerto asignado',
name: 'last',
width:190,
allowBlank: false,
blankText: "Puerto asignado (cada cliente tiene uno unico)"
}, {
fieldLabel: 'Carga esperada',
name: 'company',
width:190,
allowBlank: false,
blankText: "Cantidad de servidores en pararelo"
},
],
buttons: [{
text: 'Guardar',
type: 'submit',
handler: function(){
simple.form.submit({
url : "http://localhost:3000/config/set",
method : "post",
success: function() {
Ext.MessageBox.alert('Sii','Woot!');
},
failure: function() {
Ext.MessageBox.alert('Noo','Woooot :(');
},
waitMsg : "Grabando..."
});
}
}],
});
simple.render(document.body);
});