Ext.override(Ext.form.Field,{onRender:function(c,a){Ext.form.Field.superclass.onRender.call(this,c,a);if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}if(this.tooltip){b["ext:qtip"]=this.tooltip.tip;b["ext:qwidth"]=this.tooltip.width||100}this.el=c.createChild(b,a)}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.el.dom.readOnly=true}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls]);this.initValue()}});Ext.override(Ext.form.Field,{afterRender:function(){if(this.helpText&&this.helpText!=""){var b=findLabel(this);if(b){var a=b.createChild({tag:"img",src:"../../../styles/common/ext/resources/images/default/help/aide-icone-16.png",cls:"info-tooltip",style:"info-tooltip"});Ext.QuickTips.register({target:a,title:"",text:this.helpText,enabled:true})}}this.cform=this.findParentByType("metaform");if(!this.cform){this.cform=this.findParentByType("form")}if(this.cform){this.cform.fireEvent("imOk")}if(this.getValue()==0||this.getValue()==""){if(this.xtype=="combo"){this.clearValue()}}Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()}});var findLabel=function(c){var b=null;var a=null;b=c.getEl().up("div.x-form-item");if(b){a=b.child("label")}if(a){return a}};Ext.form.VTypes.hostnameVal1=/^[a-zA-Z][-.a-zA-Z0-9]{0,254}$/;Ext.form.VTypes.hostnameVal2=/^[a-zA-Z]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9]){0,1}([.][a-zA-Z]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9]){0,1}){0,}$/;Ext.form.VTypes.ipVal=/^([1-9][0-9]{0,1}|1[013-9][0-9]|12[0-689]|2[01][0-9]|22[0-3])([.]([1-9]{0,1}[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){2}[.]([1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-4])$/;Ext.form.VTypes.netmaskVal=/^(128|192|224|24[08]|25[245].0.0.0)|(255.(0|128|192|224|24[08]|25[245]).0.0)|(255.255.(0|128|192|224|24[08]|25[245]).0)|(255.255.255.(0|128|192|224|24[08]|252))$/;Ext.form.VTypes.portVal=/^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/;Ext.form.VTypes.multicastVal=/^((22[5-9]|23[0-9])([.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})|(224[.]([1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])([.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){2})|(224[.]0[.]([1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])([.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])))$/;Ext.form.VTypes.usernameVal=/^[a-zA-Z][-_.a-zA-Z0-9]{0,30}$/;Ext.form.VTypes.passwordVal1=/^.{6,31}$/;Ext.form.VTypes.passwordVal2=/[^a-zA-Z].*[^a-zA-Z]/;Ext.form.VTypes.hostname=function(a){if(!Ext.form.VTypes.hostnameVal1.test(a)){Ext.form.VTypes.hostnameText="Must begin with a letter and not exceed 255 characters";return false}Ext.form.VTypes.hostnameText="L[.L][.L][.L][...] where L begins with a letter, ends with a letter or number, and does not exceed 63 characters";return Ext.form.VTypes.hostnameVal2.test(a)};Ext.form.VTypes.hostnameText="Invalid Hostname";Ext.form.VTypes.hostnameMask=/[-.a-zA-Z0-9]/;Ext.form.VTypes.ip=function(a){return Ext.form.VTypes.ipVal.test(a)};Ext.form.VTypes.ipText="1.0.0.1 - 223.255.255.254 excluding 127.x.x.x";Ext.form.VTypes.ipMask=/[.0-9]/;Ext.form.VTypes.netmask=function(a){return Ext.form.VTypes.netmaskVal.test(a)};Ext.form.VTypes.netmaskText="128.0.0.0 - 255.255.255.252";Ext.form.VTypes.netmaskMask=/[.0-9]/;Ext.form.VTypes.port=function(a){return Ext.form.VTypes.portVal.test(a)};Ext.form.VTypes.portText="0 - 65535";Ext.form.VTypes.portMask=/[0-9]/;Ext.form.VTypes.multicast=function(a){return Ext.form.VTypes.multicastVal.test(a)};Ext.form.VTypes.multicastText="224.0.1.0 - 239.255.255.255";Ext.form.VTypes.multicastMask=/[.0-9]/;Ext.form.VTypes.username=function(a){return Ext.form.VTypes.usernameVal.test(a)};Ext.form.VTypes.usernameText="Username must begin with a letter and cannot exceed 255 characters";Ext.form.VTypes.usernameMask=/[-_.a-zA-Z0-9]/;Ext.form.VTypes.password=function(a){if(!Ext.form.VTypes.passwordVal1.test(a)){Ext.form.VTypes.passwordText="Le mot de passe doit faire entre 6 et 31 caractères";return false}Ext.form.VTypes.passwordText="Le mot de passe doit inclure au moins 2 chiffres";return Ext.form.VTypes.passwordVal2.test(a)};Ext.form.VTypes.notEditableMask=/[.0-9]/;Ext.form.VTypes.rexAddressText="Veuillez entrer une adresse valide.";Ext.form.VTypes.rexAddressVal=/^[ a-zA-Z0-9éèàâäîïçùûüôö\.\-\,\']{0,500}$/;Ext.form.VTypes.rexAddressMask=/^[ a-zA-Z0-9éèàâäîïçùûüôö\.\-\,\']{0,500}$/;Ext.form.VTypes.rexAddress=function(a){return Ext.form.VTypes.rexAddressVal.test(a)};Ext.form.VTypes.rexFilePathText="Veuillez entrer un chemin valide ";Ext.form.VTypes.rexFilePathVal=/^[ \/-_.a-zA-Z0-9]{0,500}$/;Ext.form.VTypes.rexFilePathMask=/^[ \/-_.a-zA-Z0-9]{0,500}$/;Ext.form.VTypes.rexFilePath=function(a){return Ext.form.VTypes.rexFilePathVal.test(a)};Ext.form.VTypes.ubat=function(c){var d=0.1;var b=1.7;var a=false;if(c>=d&&c<=b){a=true}Ext.form.VTypes.ubatText="La valeur "+c+" n'est pas comprise entre [ "+d+" et "+b+" ]";return a};Ext.form.VTypes.coeff_compacite=function(c){var d=0.3;var b=1.7;var a=false;if(c>=d&&c<=b){a=true}Ext.form.VTypes.coeff_compaciteText="La valeur "+c+" n'est pas comprise entre [ "+d+" et "+b+" ]";return a};Ext.form.VTypes.indice_indep_eau=function(c){var d=0;var b=1;var a=false;if(c>=d&&c<=b){a=true}Ext.form.VTypes.indice_indep_eauText="La valeur "+c+" n'est pas comprise entre [ "+d+" et "+b+" ]";return a};Ext.form.VTypes.duree_vie_bat=function(c){var d=20;var b=100;var a=false;if(c>=d&&c<=b){a=true}Ext.form.VTypes.duree_vie_batText="La valeur "+c+" n'est pas comprise entre [ "+d+" et "+b+" ]";return a};Ext.form.VTypes.mat_eco_concu=function(c){var d=0;var b=100;var a=false;if(c>=d&&c<=b){a=true}Ext.form.VTypes.mat_eco_concuText="La valeur "+c+" n'est pas comprise entre [ "+d+" et "+b+" ]";return a};
