Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
22cf8ef7
Commit
22cf8ef7
authored
Dec 02, 2011
by
niskac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in the BootstrapCode.
parent
d5a582c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
BootstrapCode.php
gii/bootstrap/BootstrapCode.php
+4
-4
No files found.
gii/bootstrap/BootstrapCode.php
View file @
22cf8ef7
...
...
@@ -12,15 +12,15 @@ class BootstrapCode extendS CrudCode
public
function
generateActiveBlock
(
$modelClass
,
$column
)
{
if
(
$column
->
type
===
'boolean'
)
return
"
\$
form->checkBox
Block
(
\$
model,'
{
$column
->
name
}
')"
;
return
"
\$
form->checkBox
Row
(
\$
model,'
{
$column
->
name
}
')"
;
else
if
(
stripos
(
$column
->
dbType
,
'text'
)
!==
false
)
return
"
\$
form->textArea
Block
(
\$
model,'
{
$column
->
name
}
',array('rows'=>6, 'cols'=>50, 'class'=>'span8'))"
;
return
"
\$
form->textArea
Row
(
\$
model,'
{
$column
->
name
}
',array('rows'=>6, 'cols'=>50, 'class'=>'span8'))"
;
else
{
if
(
preg_match
(
'/^(password|pass|passwd|passcode)$/i'
,
$column
->
name
))
$inputField
=
'passwordField
Block
'
;
$inputField
=
'passwordField
Row
'
;
else
$inputField
=
'textField
Block
'
;
$inputField
=
'textField
Row
'
;
if
(
$column
->
type
!==
'string'
||
$column
->
size
===
null
)
return
"
\$
form->
{
$inputField
}
(
\$
model,'
{
$column
->
name
}
',array('class'=>'span5'))"
;
...
...
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