LSformElement_mail : Added disableMailSending parameter

This commit is contained in:
Benjamin Renard 2010-12-03 18:04:40 +01:00
parent 6d9e0f0c8d
commit 9db97a53f3
2 changed files with 13 additions and 2 deletions

View file

@ -56,6 +56,13 @@ class LSformElement_mail extends LSformElement_text {
}
return parent :: getDisplay();
}
function fetchTemplate($template=NULL,$variables=array()) {
if (isset($this -> params['html_options']['disableMailSending']) && $this -> params['html_options']['disableMailSending']) {
$this -> fetchVariables['uriClass'] .= " LSformElement_mail_disableMailSending";
}
return parent :: fetchTemplate($template,$variables);
}
}
?>

View file

@ -12,10 +12,14 @@ var LSformElement_mail = new Class({
el = document;
}
el.getElements('input.LSformElement_mail').each(function(input) {
this.addBtnAfter.bind(this)(input);
if (!input.hasClass('LSformElement_mail_disableMailSending')) {
this.addBtnAfter.bind(this)(input);
}
}, this);
el.getElements('a.LSformElement_mail').each(function(a) {
this.addBtnAfter.bind(this)(a);
if (!input.hasClass('LSformElement_mail_disableMailSending')) {
this.addBtnAfter.bind(this)(a);
}
}, this);
},