Commit 2bbe6e4c authored by Sylvain's avatar Sylvain

Mise à jour du prefix et suffix

parent 08c334e0
......@@ -830,7 +830,7 @@ class Field2Bt4
if (!empty($this->prefix)) {
$template = '<div class="input-group-prepend">' . PHP_EOL;
if (preg_match('/<button.*/', $this->prefix)) {
if (preg_match('/<(button|img).*/', $this->prefix)) {
$template .= ' %s' . PHP_EOL;
} else {
$template .= ' <div class="input-group-text">%s</div>' . PHP_EOL;
......@@ -853,7 +853,7 @@ class Field2Bt4
if (!empty($this->suffix)) {
$template = '<div class="input-group-append">' . PHP_EOL;
if (preg_match('/<button.*/', $this->suffix)) {
if (preg_match('/<(button|img).*/', $this->suffix)) {
$template .= ' %s' . PHP_EOL;
} else {
$template .= ' <div class="input-group-text">%s</div>' . PHP_EOL;
......
......@@ -2,6 +2,7 @@
namespace Goldenscarab\Modulus\Service\Field\Compose;
use Illuminate\Support\Str;
use \Illuminate\Support\HtmlString;
......@@ -619,9 +620,9 @@ class FieldBt4
// Gestion des ID
if (!is_bool($this->indice)) {
$this->id = str_slug($this->name . '-' . $this->indice . '-' . $this->value);
$this->id = Str::slug($this->name . '-' . $this->indice . '-' . $this->value);
} else {
$this->id = str_slug($this->name . '-' . $this->value);
$this->id = Str::slug($this->name . '-' . $this->value);
}
......@@ -1124,7 +1125,7 @@ class FieldBt4
if (!is_null($this->indice)) {
$this->id = $this->id . '-' . $this->indice;
}
$this->id = str_slug($this->id);
$this->id = Str::slug($this->id);
// Traitement de la classe
$this->class = 'form-control ' . $this->class;
......
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