dojo.provide("max_validate_base");

//This class takes care of all AJAX validationcalls 
dojo.declare('max_validate_base', null, {
	constructor: function(ZendFrame_url_root) {
		this.validateUrl = ZendFrame_url_root
			+ (ZendFrame_url_root.substring(ZendFrame_url_root.length - 1) == '/'? '' : '/')
			+ 'formvalidate/';
		this.validateFields = true;
	},
	
	validationSuccessEyeCandy: function(formId)
	{
		// If the validation was a success then do the real submit ajax call 
		// and change the current accordingly
		dojo.query("#" + formId + " input[type=submit]").forEach(function(el){
			el.value = 'Validation success...';
		});
	}
});
