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
16f279eb
Commit
16f279eb
authored
May 22, 2014
by
Kartik Visweswaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #3472: Configurable option to encode spaces in dropdowns
parent
ed5fe964
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
BaseHtml.php
framework/helpers/BaseHtml.php
+4
-2
No files found.
framework/helpers/BaseHtml.php
View file @
16f279eb
...
...
@@ -745,7 +745,6 @@ class BaseHtml
}
$options
[
'name'
]
=
$name
;
$selectOptions
=
static
::
renderSelectOptions
(
$selection
,
$items
,
$options
);
unset
(
$options
[
'encodeSpaces'
]);
return
static
::
tag
(
'select'
,
"
\n
"
.
$selectOptions
.
"
\n
"
,
$options
);
}
...
...
@@ -808,7 +807,6 @@ class BaseHtml
$hidden
=
''
;
}
$selectOptions
=
static
::
renderSelectOptions
(
$selection
,
$items
,
$options
);
unset
(
$options
[
'encodeSpaces'
]);
return
$hidden
.
static
::
tag
(
'select'
,
"
\n
"
.
$selectOptions
.
"
\n
"
,
$options
);
}
...
...
@@ -1358,6 +1356,8 @@ class BaseHtml
*
* - groups: array, the attributes for the optgroup tags. The structure of this is similar to that of 'options',
* except that the array keys represent the optgroup labels specified in $items.
* - encodeSpaces: bool, whether to encode spaces in option prompt and option value with ` ` character.
* Defaults to `false`.
*
* The rest of the options will be rendered as the attributes of the resulting tag. The values will
* be HTML-encoded using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
...
...
@@ -1411,6 +1411,8 @@ class BaseHtml
* - unselect: string, the value that will be submitted when no option is selected.
* When this attribute is set, a hidden field will be generated so that if no option is selected in multiple
* mode, we can still obtain the posted unselect value.
* - encodeSpaces: bool, whether to encode spaces in option prompt and option value with ` ` character.
* Defaults to `false`.
*
* The rest of the options will be rendered as the attributes of the resulting tag. The values will
* be HTML-encoded using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
...
...
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