fixed captcha to work even in not htmlform environments
added captch field to contact the maintainer form in matrix added default label to captcha
This commit is contained in:
parent
dea8fdc109
commit
6be1d2f76e
4 changed files with 18 additions and 3 deletions
|
|
@ -47,6 +47,10 @@ See the super class for additional details.
|
|||
|
||||
The following additional parameters have been added via this sub class.
|
||||
|
||||
=head3 label
|
||||
|
||||
Defaults to "Verify Your Humanity"
|
||||
|
||||
=head4 profileEnabled
|
||||
|
||||
Flag that tells the User Profile system that this is a valid form element in a User Profile
|
||||
|
|
@ -62,6 +66,9 @@ sub definition {
|
|||
formName=>{
|
||||
defaultValue=>$i18n->get("topicName")
|
||||
},
|
||||
label => {
|
||||
defaultValue=>$i18n->get("verify your humanity")
|
||||
},
|
||||
profileEnabled=>{
|
||||
defaultValue=>0
|
||||
},
|
||||
|
|
@ -100,8 +107,7 @@ sub toHtml {
|
|||
$self->set("size", 6);
|
||||
$self->set("maxlength", 6);
|
||||
$self->session->scratch->set("captcha_".$self->get("name"), $challenge);
|
||||
$self->set("subtext", '<p style="display:inline;vertical-align:middle;"><img src="'.$storage->getUrl($filename).'" style="border-style:none;vertical-align:middle;" alt="captcha" /></p>'.$self->get("subtext"));
|
||||
return $self->SUPER::toHtml;
|
||||
return $self->SUPER::toHtml.'<p style="display:inline;vertical-align:middle;"><img src="'.$storage->getUrl($filename).'" style="border-style:none;vertical-align:middle;" alt="captcha" /></p>';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue