mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fixed a few small bugs in the contactform: verification can be turned off now, 2. customfiled is now disable if not set, email-address verification allows for "-" in the mail part
This commit is contained in:
parent
24d7fec287
commit
f0457e8fee
@ -37,7 +37,7 @@ class addressbook_contactform
|
||||
|
||||
if (is_array($content))
|
||||
{
|
||||
if ($content['captcha'] != $content['captcha_result'])
|
||||
if (isset($content['captcha_result']) && $content['captcha'] != $content['captcha_result'])
|
||||
{
|
||||
$tpl->set_validation_error('captcha',lang('Wrong - try again ...'));
|
||||
}
|
||||
@ -134,9 +134,11 @@ class addressbook_contactform
|
||||
{
|
||||
$n = $num1; $num1 = $num2; $num2 = $n;
|
||||
}
|
||||
$content['captcha_task'] = sprintf('%d - %d =',$num1,$num2);
|
||||
$preserv['captcha_result'] = $num1-$num2;
|
||||
|
||||
if (in_array('captcha',$fields))
|
||||
{
|
||||
$content['captcha_task'] = sprintf('%d - %d =',$num1,$num2);
|
||||
$preserv['captcha_result'] = $num1-$num2;
|
||||
}
|
||||
return $tpl->exec('addressbook.addressbook_contactform.display',$content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -39,7 +39,7 @@
|
||||
<row disabled="!@show[email]">
|
||||
<image src="email.png"/>
|
||||
<description value="Email"/>
|
||||
<textbox size="64" maxlength="64" validator="/^[a-z0-9.-_]+@[a-z0-9-]+(\.[a-z0-9-]+)+$/i" span="4" id="email" needed="1"/>
|
||||
<textbox size="64" maxlength="64" validator="/^[a-z0-9._-]+@[a-z0-9-]+(\.[a-z0-9-]+)+$/i" span="4" id="email" needed="1"/>
|
||||
<description class="redItalic" value="*"/>
|
||||
</row>
|
||||
<row disabled="!@show[tel_work]">
|
||||
@ -111,7 +111,7 @@
|
||||
<textbox id="@customfield[1]" span="4" needed="1" size="64"/>
|
||||
<description class="redItalic" value="*"/>
|
||||
</row>
|
||||
<row>
|
||||
<row disabled="!@show[custom2]">
|
||||
<description/>
|
||||
<description value="@customlabel[2]"/>
|
||||
<textbox id="@customfield[2]" span="4" size="64"/>
|
||||
|
Loading…
Reference in New Issue
Block a user