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
511535ec
Commit
511535ec
authored
Nov 06, 2014
by
Denis M
Committed by
Alexander Makarov
Nov 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4181: Added `yii\bootstrap\Modal::$headerOptions` and `yii\bootstrap\Modal::$footerOptions`
parent
4b97abac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
Modal.php
extensions/bootstrap/Modal.php
+16
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
No files found.
extensions/bootstrap/Modal.php
View file @
511535ec
...
...
@@ -44,10 +44,22 @@ class Modal extends Widget
*/
public
$header
;
/**
* @var string additional header options
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
* @since 2.0.1
*/
public
$headerOptions
;
/**
* @var string the footer content in the modal window.
*/
public
$footer
;
/**
* @var string additional footer options
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
* @since 2.0.1
*/
public
$footerOptions
;
/**
* @var string the modal size. Can be [[SIZE_LARGE]] or [[SIZE_SMALL]], or empty for default.
*/
public
$size
;
...
...
@@ -125,7 +137,8 @@ class Modal extends Widget
$this
->
header
=
$button
.
"
\n
"
.
$this
->
header
;
}
if
(
$this
->
header
!==
null
)
{
return
Html
::
tag
(
'div'
,
"
\n
"
.
$this
->
header
.
"
\n
"
,
[
'class'
=>
'modal-header'
]);
Html
::
addCssClass
(
$this
->
headerOptions
,
'modal-header'
);
return
Html
::
tag
(
'div'
,
"
\n
"
.
$this
->
header
.
"
\n
"
,
$this
->
headerOptions
);
}
else
{
return
null
;
}
...
...
@@ -156,7 +169,8 @@ class Modal extends Widget
protected
function
renderFooter
()
{
if
(
$this
->
footer
!==
null
)
{
return
Html
::
tag
(
'div'
,
"
\n
"
.
$this
->
footer
.
"
\n
"
,
[
'class'
=>
'modal-footer'
]);
Html
::
addCssClass
(
$this
->
footerOptions
,
'modal-footer'
);
return
Html
::
tag
(
'div'
,
"
\n
"
.
$this
->
footer
.
"
\n
"
,
$this
->
footerOptions
);
}
else
{
return
null
;
}
...
...
framework/CHANGELOG.md
View file @
511535ec
...
...
@@ -20,6 +20,7 @@ Yii Framework 2 Change Log
-
Bug #5925:
`ArrayHelper::htmlEncode()`
does not work properly when the value being encoded is a nested array (tebazil)
-
Bug: Gii console command help information does not contain global options (qiangxue)
-
Bug:
`yii\web\UrlRule`
was unable to create URLs for rules containing unicode characters (samdark)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
-
Enh #4263: Added migration and SQL schema files for
`yii\log\DbTarget`
(samdark)
-
Enh #4457: Added support for using noscript for css files registered through asset bundles and Html helper (samdark)
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
...
...
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