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
8b8fec93
Commit
8b8fec93
authored
Feb 14, 2012
by
niskac
Browse files
Options
Browse Files
Download
Plain Diff
merged heads
parents
fbe3d257
09f7814f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
bootstrap.min.css
assets/css/bootstrap.min.css
+6
-1
forms.less
lib/bootstrap/less/forms.less
+7
-1
BootActiveForm.php
widgets/BootActiveForm.php
+4
-11
No files found.
assets/css/bootstrap.min.css
View file @
8b8fec93
...
...
@@ -530,11 +530,16 @@ input,
button
,
select
,
textarea
{
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
13px
;
font-weight
:
normal
;
line-height
:
18px
;
}
input
,
button
,
select
,
textarea
{
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
}
label
{
display
:
block
;
margin-bottom
:
5px
;
...
...
lib/bootstrap/less/forms.less
View file @
8b8fec93
...
...
@@ -42,7 +42,13 @@ input,
button,
select,
textarea {
#font > .sans-serif(@baseFontSize,normal,@baseLineHeight);
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
}
input,
button,
select,
textarea {
#font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
}
// Identify controls by their labels
...
...
widgets/BootActiveForm.php
View file @
8b8fec93
...
...
@@ -372,10 +372,8 @@ class BootActiveForm extends CActiveForm
if
(
!
isset
(
$htmlOptions
[
'class'
]))
$htmlOptions
[
'class'
]
=
$this
->
errorMessageCssClass
;
$tag
=
$this
->
inlineErrors
?
'span'
:
'p'
;
if
(
!
$enableAjaxValidation
&&
!
$enableClientValidation
)
return
$this
->
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
,
$tag
);
return
$this
->
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
);
$id
=
CHtml
::
activeId
(
$model
,
$attribute
);
$inputID
=
isset
(
$htmlOptions
[
'inputID'
])
?
$htmlOptions
[
'inputID'
]
:
$id
;
...
...
@@ -434,7 +432,7 @@ class BootActiveForm extends CActiveForm
$option
[
'clientValidation'
]
=
"js:function(value, messages, attribute)
{
\n".implode("\n",$validators)."\n
}
"
;
}
$html
=
$this
->
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
,
$tag
);
$html
=
$this
->
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
);
if
(
$html
===
''
)
{
...
...
@@ -460,18 +458,13 @@ class BootActiveForm extends CActiveForm
* @see CModel::getErrors
* @see errorMessageCss
*/
public
static
function
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
=
array
()
,
$tag
=
'span'
)
public
static
function
getErrorHtml
(
$model
,
$attribute
,
$htmlOptions
=
array
())
{
CHtml
::
resolveName
(
$model
,
$attribute
);
$error
=
$model
->
getError
(
$attribute
);
if
(
$error
!==
null
)
{
if
(
!
isset
(
$htmlOptions
[
'class'
]))
$htmlOptions
[
'class'
]
=
'help-inline'
;
return
CHtml
::
tag
(
$tag
,
$htmlOptions
,
$error
);
// Bootstrap errors must be spans
}
return
CHtml
::
tag
(
'span'
,
$htmlOptions
,
$error
);
// Bootstrap errors must be spans
else
return
''
;
}
...
...
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