Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
0ea7c2dd
Commit
0ea7c2dd
authored
Apr 02, 2015
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18 from mikehaertl/7895-label-option
Fix issue 7895 (yii2): label option ignored
parents
a163a130
2413f3f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
ActiveField.php
ActiveField.php
+9
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
No files found.
ActiveField.php
View file @
0ea7c2dd
...
@@ -201,6 +201,9 @@ class ActiveField extends \yii\widgets\ActiveField
...
@@ -201,6 +201,9 @@ class ActiveField extends \yii\widgets\ActiveField
$this
->
template
=
$options
[
'template'
];
$this
->
template
=
$options
[
'template'
];
unset
(
$options
[
'template'
]);
unset
(
$options
[
'template'
]);
}
}
if
(
isset
(
$options
[
'label'
]))
{
$this
->
parts
[
'{labelTitle}'
]
=
$options
[
'label'
];
}
if
(
$this
->
form
->
layout
===
'horizontal'
)
{
if
(
$this
->
form
->
layout
===
'horizontal'
)
{
Html
::
addCssClass
(
$this
->
wrapperOptions
,
$this
->
horizontalCssClasses
[
'offset'
]);
Html
::
addCssClass
(
$this
->
wrapperOptions
,
$this
->
horizontalCssClasses
[
'offset'
]);
}
}
...
@@ -223,6 +226,9 @@ class ActiveField extends \yii\widgets\ActiveField
...
@@ -223,6 +226,9 @@ class ActiveField extends \yii\widgets\ActiveField
$this
->
template
=
$options
[
'template'
];
$this
->
template
=
$options
[
'template'
];
unset
(
$options
[
'template'
]);
unset
(
$options
[
'template'
]);
}
}
if
(
isset
(
$options
[
'label'
]))
{
$this
->
parts
[
'{labelTitle}'
]
=
$options
[
'label'
];
}
if
(
$this
->
form
->
layout
===
'horizontal'
)
{
if
(
$this
->
form
->
layout
===
'horizontal'
)
{
Html
::
addCssClass
(
$this
->
wrapperOptions
,
$this
->
horizontalCssClasses
[
'offset'
]);
Html
::
addCssClass
(
$this
->
wrapperOptions
,
$this
->
horizontalCssClasses
[
'offset'
]);
}
}
...
@@ -381,6 +387,8 @@ class ActiveField extends \yii\widgets\ActiveField
...
@@ -381,6 +387,8 @@ class ActiveField extends \yii\widgets\ActiveField
}
}
$this
->
parts
[
'{beginLabel}'
]
=
Html
::
beginTag
(
'label'
,
$options
);
$this
->
parts
[
'{beginLabel}'
]
=
Html
::
beginTag
(
'label'
,
$options
);
$this
->
parts
[
'{endLabel}'
]
=
Html
::
endTag
(
'label'
);
$this
->
parts
[
'{endLabel}'
]
=
Html
::
endTag
(
'label'
);
$this
->
parts
[
'{labelTitle}'
]
=
$label
;
if
(
!
isset
(
$this
->
parts
[
'{labelTitle}'
]))
{
$this
->
parts
[
'{labelTitle}'
]
=
$label
;
}
}
}
}
}
CHANGELOG.md
View file @
0ea7c2dd
...
@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
2.
0.4 under development
2.
0.4 under development
-----------------------
-----------------------
-
Bug #18:
`label`
option ignored by
`yii\bootstrap\Activefield::checkbox()`
and
`yii\bootstrap\Activefield::radio()`
(mikehaertl)
-
Bug #5984:
`yii\bootstrap\Activefield::checkbox()`
caused browser to link label to the wrong input (cebe)
-
Bug #5984:
`yii\bootstrap\Activefield::checkbox()`
caused browser to link label to the wrong input (cebe)
-
Enh #7633: Added
`ActionColumn::$buttonOptions`
for defining HTML options to be added to the default buttons (cebe)
-
Enh #7633: Added
`ActionColumn::$buttonOptions`
for defining HTML options to be added to the default buttons (cebe)
-
Enh: Added
`Nav::$dropDownCaret`
to allow customization of the dropdown caret symbol (cebe)
-
Enh: Added
`Nav::$dropDownCaret`
to allow customization of the dropdown caret symbol (cebe)
...
...
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