Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
PSDI Army
yii2
Commits
37864402
Commit
37864402
authored
Aug 25, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4762: Reverted automatic ID fix.
parent
22839d92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
BaseHtml.php
framework/helpers/BaseHtml.php
+1
-1
HtmlTest.php
tests/unit/framework/helpers/HtmlTest.php
+0
-8
No files found.
framework/helpers/BaseHtml.php
View file @
37864402
...
...
@@ -1908,6 +1908,6 @@ class BaseHtml
public
static
function
getInputId
(
$model
,
$attribute
)
{
$name
=
strtolower
(
static
::
getInputName
(
$model
,
$attribute
));
return
str_replace
([
'[]'
,
']['
,
'['
,
']'
,
' '
,
'.'
],
[
''
,
'-'
,
'-'
,
''
,
'-
'
,
'-'
],
$name
);
return
str_replace
([
'[]'
,
']['
,
'['
,
']'
,
' '
],
[
''
,
'-'
,
'-'
,
'
'
,
'-'
],
$name
);
}
}
tests/unit/framework/helpers/HtmlTest.php
View file @
37864402
...
...
@@ -3,7 +3,6 @@
namespace
yiiunit\framework\helpers
;
use
Yii
;
use
yii\base\DynamicModel
;
use
yii\helpers\Html
;
use
yiiunit\TestCase
;
...
...
@@ -158,13 +157,6 @@ class HtmlTest extends TestCase
$this
->
assertEquals
(
'<button type="reset" class="t" name="test" value="value">content<></button>'
,
Html
::
resetButton
(
'content<>'
,
[
'name'
=>
'test'
,
'value'
=>
'value'
,
'class'
=>
't'
]));
}
public
function
testInputId
()
{
$model
=
new
DynamicModel
([
'test'
,
'relation.name'
]);
$this
->
assertEquals
(
'<input type="text" id="dynamicmodel-test" name="DynamicModel[test]">'
,
Html
::
activeTextInput
(
$model
,
'test'
));
$this
->
assertEquals
(
'<input type="text" id="dynamicmodel-relation-name" name="DynamicModel[relation.name]">'
,
Html
::
activeTextInput
(
$model
,
'relation.name'
));
}
public
function
testInput
()
{
$this
->
assertEquals
(
'<input type="text">'
,
Html
::
input
(
'text'
));
...
...
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