2009-03-25 03:14:26 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Editable Spam Protecter Field. Used with the User Defined Forms module (if
|
|
|
|
* installed) to allow the user to have captcha fields with their custom forms
|
|
|
|
*
|
2009-09-17 06:06:53 +02:00
|
|
|
* @package spamprotection
|
2009-03-25 03:14:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
class EditableSpamProtectionField extends EditableFormField {
|
|
|
|
|
|
|
|
static $singular_name = 'Spam Protection Field';
|
|
|
|
|
2009-09-17 06:06:53 +02:00
|
|
|
static $plural_name = 'Spam Protection Fields';
|
2009-03-25 03:14:26 +01:00
|
|
|
|
|
|
|
function getFormField() {
|
2009-06-05 00:57:33 +02:00
|
|
|
if($protector = SpamProtectorManager::get_spam_protector()) {
|
2009-03-25 03:14:26 +01:00
|
|
|
if($protector) {
|
|
|
|
$protector = new $protector();
|
2009-09-17 06:06:53 +02:00
|
|
|
return $protector->getFormField($this->Name, $this->Title, null);
|
2009-03-25 03:14:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2009-09-17 06:06:53 +02:00
|
|
|
|
2009-04-20 05:06:29 +02:00
|
|
|
public function Icon() {
|
|
|
|
return 'spamprotection/images/' . strtolower($this->class) . '.png';
|
2009-03-25 03:14:26 +01:00
|
|
|
}
|
2009-04-20 05:06:29 +02:00
|
|
|
|
2009-07-05 08:47:43 +02:00
|
|
|
function showInReports() {
|
|
|
|
return false;
|
|
|
|
}
|
2009-06-05 00:57:33 +02:00
|
|
|
}
|