Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Field
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Modulus
Services
Field
Commits
2bbe6e4c
Commit
2bbe6e4c
authored
May 05, 2020
by
Sylvain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mise à jour du prefix et suffix
parent
08c334e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/Compose/Field2Bt4.php
src/Compose/Field2Bt4.php
+2
-2
src/Compose/FieldBt4.php
src/Compose/FieldBt4.php
+4
-3
No files found.
src/Compose/Field2Bt4.php
View file @
2bbe6e4c
...
...
@@ -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
;
...
...
src/Compose/FieldBt4.php
View file @
2bbe6e4c
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment