captcha lettres
@ -49,16 +49,17 @@ class template {
|
|||||||
'value' => ''
|
'value' => ''
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Génère deux nombres pour le captcha
|
// Génère deux nombres pour le captcha
|
||||||
$numbers=array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);
|
$numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);
|
||||||
$letters=array('zéro','un','deux','trois','quatre','cinq','six','sept','huit','neuf','dix','onze','douze','treize','quatorze','quinze','seize','dix-sept','dix-huit','dix-neuf','vingt');
|
$letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a');
|
||||||
$firstNumber=rand ( 0 , count($letters)-1 );
|
$firstNumber = rand ( 0 , count($letters)-1 );
|
||||||
$secondNumber=rand ( 0 , count($letters)-1 );
|
$secondNumber = rand ( 0 , count($letters)-1 );
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
$html .= self::label($attributes['id'], $letters[$firstNumber] . ' + ' . $letters[$secondNumber] . ' = ? (réponse en chiffres)', [
|
$html .= self::label($attributes['id'],
|
||||||
'help' => $attributes['help']
|
'<img class="captchaNumber" src="core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png" /> + <img class="captchaNumber" src="core/vendor/zwiico/png/' . $letters[$secondNumber] . '.png" /> = ? (réponse en chiffres)', [
|
||||||
]);
|
'help' => $attributes['help']
|
||||||
|
]);
|
||||||
// Notice
|
// Notice
|
||||||
$notice = '';
|
$notice = '';
|
||||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||||
|
@ -1359,3 +1359,10 @@ th.col12 {
|
|||||||
.accordion-content {
|
.accordion-content {
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Captcha
|
||||||
|
* Taille des images
|
||||||
|
*/
|
||||||
|
.captchaNumber {
|
||||||
|
height:20px;
|
||||||
|
}
|
BIN
core/vendor/zwiico/png/a.png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
core/vendor/zwiico/png/b.png
vendored
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
core/vendor/zwiico/png/c.png
vendored
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
core/vendor/zwiico/png/d.png
vendored
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
core/vendor/zwiico/png/e.png
vendored
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
core/vendor/zwiico/png/f.png
vendored
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
core/vendor/zwiico/png/g.png
vendored
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
core/vendor/zwiico/png/h.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
core/vendor/zwiico/png/i.png
vendored
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
core/vendor/zwiico/png/j.png
vendored
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
core/vendor/zwiico/png/k.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
core/vendor/zwiico/png/l.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
core/vendor/zwiico/png/m.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
core/vendor/zwiico/png/n.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
core/vendor/zwiico/png/o.png
vendored
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
core/vendor/zwiico/png/p.png
vendored
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
core/vendor/zwiico/png/q.png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
core/vendor/zwiico/png/r.png
vendored
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
core/vendor/zwiico/png/s.png
vendored
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
core/vendor/zwiico/png/t.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
core/vendor/zwiico/png/u.png
vendored
Normal file
After Width: | Height: | Size: 3.1 KiB |