diff --git a/public_html/includes/class/class.LSformElement_mail.php b/public_html/includes/class/class.LSformElement_mail.php
index 3459d1f8..9ef255a0 100644
--- a/public_html/includes/class/class.LSformElement_mail.php
+++ b/public_html/includes/class/class.LSformElement_mail.php
@@ -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);
+ }
}
?>
diff --git a/public_html/includes/js/LSformElement_mail.js b/public_html/includes/js/LSformElement_mail.js
index c6d88c5c..21f122eb 100644
--- a/public_html/includes/js/LSformElement_mail.js
+++ b/public_html/includes/js/LSformElement_mail.js
@@ -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);
},