All pastes #751851 Raw Edit

Someone

public text v1 · immutable
#751851 ·published 2007-10-27 19:55 UTC
rendered paste body
Ext.onReady(function(){

    Ext.QuickTips.init();

    var simple = new Ext.FormPanel({
        frame:true,
	labelWidth: 120, 
        title: 'Configuración básica',
        width: 350,
        defaultType: 'textfield',
				url : "config/set",
        items: [{
               fieldLabel: 'Cliente',
                name: 'cliente[descripcion]',
                width:190,
		allowBlank: false,
		blankText: "Nombre descriptivo del cliente",
            }, {
                fieldLabel: 'Nombre cuenta',
                name: 'cliente_nombre',
		minLength:3, 
		maxLength:20,
                width:190,
//		listeners: {
//			valid: campoValido,
//			invalid: campoInvalido,
//			scope: this
//		}
		allowBlank: false,
		blankText: "Cuenta asociadad el cliente (minusculas, sin espacios ni cosas raras)"
            }, {
                fieldLabel: 'Puerto asignado',
                name: 'swat_puerto',
                width:190,
		allowBlank: false,
		blankText: "Puerto asignado (cada cliente tiene uno unico)"
            }, {
                fieldLabel: 'Carga esperada',
                name: 'swat_carga',
                width:190,
		allowBlank: false,
		blankText: "Cantidad de servidores en pararelo"
            },
        ],

	failure: function() {
		alert('Noo','Woooot :(');
	},
	success: function() {
		alert('Sii','Woot!');
	},


	buttons: [{
		text: 'Guardar',
		type:  'submit',
//		disabled: true,
		handler: function(){
			simple.form.submit({waitMsg : "Grabando..."});
		}
	}],



    });

	function campoValido(fld) {
		alert(fld.getName() + ' valid.');
//		btn.setDisabled(false);
	}
	function campoInvalido(fld, msg){
		alert(fld.getName() + ' invalid. ' + msg);
//		btn.setDisabled(true);
	}	


	simple.render(document.body);

    
});