Changeset 1188 for trunk/lib/jelix-www
- Timestamp:
- 12/01/08 12:58:35 (1 month ago)
- Files:
-
- trunk/lib/jelix-www/js/jforms_jquery.js (modified) (3 diffs)
- trunk/lib/jelix-www/js/jforms_light.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix-www/js/jforms_jquery.js
r1187 r1188 244 244 245 245 /** 246 * control with optional confirmation string246 * control for secret input 247 247 */ 248 248 function jFormsJQControlSecret(name, label) { … … 253 253 this.errRequired = ''; 254 254 this.help=''; 255 this.confirmField = null;256 255 this.minLength = -1; 257 256 this.maxLength = -1; … … 262 261 if(this.maxLength != -1 && val.length > this.maxLength) 263 262 return false; 264 265 if(this.confirmField){266 var val2 = jfrm.getValue(jfrm.frmElt.elements[this.confirmField.name]);267 if(val != val2){268 jfrm.tForm.errorDecorator.addError(this.confirmField, 2);269 return false;270 }271 }272 263 return true; 273 264 }; 274 function jFormsJQControlSecretConfirm(name, label) { 275 this.name = name; 276 this.label = label; 277 this.errInvalid = ''; 278 this.errRequired = ''; 279 this.help=''; 280 this.minLength = -1; 281 this.maxLength = -1; 282 }; 265 266 /** 267 * confirm control 268 */ 269 function jFormsJQControlConfirm(name, label) { 270 this.name = name; 271 this.label = label; 272 this.required = false; 273 this.errInvalid = ''; 274 this.errRequired = ''; 275 this.help=''; 276 this._masterControl = name.replace(/_confirm$/,''); 277 }; 278 jFormsJQControlConfirm.prototype.check = function(val, jfrm) { 279 if(jfrm.getValue(jfrm.frmElt.elements[this._masterControl]) !== val) 280 return false; 281 return true; 282 } 283 283 284 284 /** trunk/lib/jelix-www/js/jforms_light.js
r1187 r1188 257 257 258 258 /** 259 * control with optional confirmation string259 * control for secret input 260 260 */ 261 261 function jFormsControlSecret(name, label) { … … 266 266 this.errRequired = ''; 267 267 this.help=''; 268 this.confirmField = null;269 268 this.minLength = -1; 270 269 this.maxLength = -1; … … 275 274 if(this.maxLength != -1 && val.length > this.maxLength) 276 275 return false; 277 278 if(this.confirmField){279 var val2 = jfrm.getValue(jfrm.frmElt.elements[this.confirmField.name]);280 if(val != val2){281 jfrm.tForm.errorDecorator.addError(this.confirmField, 2);282 return false;283 }284 }285 276 return true; 286 277 }; 287 function jFormsControlSecretConfirm(name, label) { 288 this.name = name; 289 this.label = label; 290 this.errInvalid = ''; 291 this.errRequired = ''; 292 this.help=''; 293 this.minLength = -1; 294 this.maxLength = -1; 295 }; 278 279 /** 280 * confirm control 281 */ 282 function jFormsControlConfirm(name, label) { 283 this.name = name; 284 this.label = label; 285 this.required = false; 286 this.errInvalid = ''; 287 this.errRequired = ''; 288 this.help=''; 289 this._masterControl = name.replace(/_confirm$/,''); 290 }; 291 jFormsControlConfirm.prototype.check = function(val, jfrm) { 292 if(jfrm.getValue(jfrm.frmElt.elements[this._masterControl]) !== val) 293 return false; 294 return true; 295 } 296 296 297 297 /**
