Commit 8a107947 authored by Sylvain's avatar Sylvain

Modif honeypot

parent 7d4beada
...@@ -475,8 +475,10 @@ class Field2Bt3 ...@@ -475,8 +475,10 @@ class Field2Bt3
break; break;
case 'checkbox': case 'checkbox':
$template = '<div class="checkbox[INLINE]">' . PHP_EOL; $template = '<div class="checkbox[INLINE]">' . PHP_EOL;
$template .= ' <input id="[ID]-[VALUE]" name="[NAME]" value="[VALUE]"[ATTRIBUTES][SELECTED]/>' . PHP_EOL; $template .= ' <label class="form-check-label" for="[ID]-[VALUE]">' . PHP_EOL;
$template .= ' <label class="form-check-label" for="[ID]-[VALUE]">[LABEL]</label>' . PHP_EOL; $template .= ' <input id="[ID]-[VALUE]" name="[NAME]" value="[VALUE]"[ATTRIBUTES][SELECTED]/>' . PHP_EOL;
$template .= ' [LABEL]' . PHP_EOL;
$template .= ' </label>' . PHP_EOL;
$template .= '</div>' . PHP_EOL; $template .= '</div>' . PHP_EOL;
$sub_template = ''; $sub_template = '';
$attr_selected = 'checked'; $attr_selected = 'checked';
......
...@@ -223,14 +223,16 @@ class Field ...@@ -223,14 +223,16 @@ class Field
public function honeypot(): string public function honeypot(): string
{ {
$field = new FieldBt4([ $field = new FieldBt4([
'name' => 'my-name', 'id' => '',
'name' => 'my-name',
'class' => 'd-none' 'class' => 'd-none'
]); ]);
$input1 = $field->renderInput(); $input1 = $field->renderInput();
$render1 = $field->renderWrapFieldEnvironment($input1); $render1 = $field->renderWrapFieldEnvironment($input1);
$field = new FieldBt4([ $field = new FieldBt4([
'name' => 'my-time', 'id' => '',
'name' => 'my-time',
'class' => 'd-none', 'class' => 'd-none',
'value' => encrypt(time()) 'value' => encrypt(time())
]); ]);
......
...@@ -226,12 +226,14 @@ class Field2 ...@@ -226,12 +226,14 @@ class Field2
public function honeypot(): string public function honeypot(): string
{ {
$field = new FieldBt4([ $field = new FieldBt4([
'id' => '',
'name' => 'my-name', 'name' => 'my-name',
'attributes' => ['class' => 'd-none'] 'attributes' => ['class' => 'd-none']
]); ]);
$input1 = $field->renderInput(); $input1 = $field->renderInput();
$field = new FieldBt4([ $field = new FieldBt4([
'id' => '',
'name' => 'my-time', 'name' => 'my-time',
'value' => encrypt(time()), 'value' => encrypt(time()),
'attributes' => ['class' => 'd-none'] 'attributes' => ['class' => 'd-none']
......
...@@ -226,12 +226,14 @@ class FieldBt3 ...@@ -226,12 +226,14 @@ class FieldBt3
public function honeypot(): string public function honeypot(): string
{ {
$field = new Field([ $field = new Field([
'id' => '',
'name' => 'my-name', 'name' => 'my-name',
'attributes' => ['class' => 'd-none'] 'attributes' => ['class' => 'd-none']
]); ]);
$input1 = $field->renderInput(); $input1 = $field->renderInput();
$field = new Field([ $field = new Field([
'id' => '',
'name' => 'my-time', 'name' => 'my-time',
'value' => encrypt(time()), 'value' => encrypt(time()),
'attributes' => ['class' => 'd-none'] 'attributes' => ['class' => 'd-none']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment