forked from mirrors/easyappointments
Make the captcha challenges more user friendly.
This commit is contained in:
parent
05e6704e67
commit
050478492c
3 changed files with 5 additions and 2 deletions
|
@ -450,7 +450,7 @@ class Booking extends EA_Controller {
|
|||
$captcha_phrase = session('captcha_phrase');
|
||||
|
||||
// Validate the CAPTCHA string.
|
||||
if ($require_captcha && $captcha_phrase !== $captcha)
|
||||
if ($require_captcha && strtoupper($captcha_phrase) !== strtoupper($captcha))
|
||||
{
|
||||
json_response([
|
||||
'captcha_verification' => FALSE
|
||||
|
|
|
@ -27,6 +27,10 @@ class Captcha extends EA_Controller {
|
|||
public function index()
|
||||
{
|
||||
$builder = new CaptchaBuilder;
|
||||
$builder->setDistortion(false);
|
||||
$builder->setMaxBehindLines(1);
|
||||
$builder->setMaxFrontLines(1);
|
||||
$builder->setBackgroundColor(255,255,255);
|
||||
$builder->build();
|
||||
session(['captcha_phrase' => $builder->getPhrase()]);
|
||||
header('Content-type: image/jpeg');
|
||||
|
|
|
@ -250,7 +250,6 @@ body {
|
|||
float: left;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 3px;
|
||||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#book-appointment-wizard .captcha-text {
|
||||
|
|
Loading…
Reference in a new issue