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
4148912b
Commit
4148912b
authored
Dec 27, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1643: Added default value for `Captcha::options`
parent
5e8a48a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
+5
-2
contact.php
apps/advanced/frontend/views/site/contact.php
+0
-1
contact.php
apps/basic/views/site/contact.php
+0
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Captcha.php
framework/yii/captcha/Captcha.php
+4
-0
No files found.
apps/advanced/frontend/views/site/contact.php
View file @
4148912b
...
...
@@ -26,7 +26,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
$form
->
field
(
$model
,
'subject'
)
?>
<?=
$form
->
field
(
$model
,
'body'
)
->
textArea
([
'rows'
=>
6
])
?>
<?=
$form
->
field
(
$model
,
'verifyCode'
)
->
widget
(
Captcha
::
className
(),
[
'options'
=>
[
'class'
=>
'form-control'
],
'template'
=>
'<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>'
,
])
?>
<div
class=
"form-group"
>
...
...
apps/basic/views/site/contact.php
View file @
4148912b
...
...
@@ -34,7 +34,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?=
$form
->
field
(
$model
,
'subject'
)
?>
<?=
$form
->
field
(
$model
,
'body'
)
->
textArea
([
'rows'
=>
6
])
?>
<?=
$form
->
field
(
$model
,
'verifyCode'
)
->
widget
(
Captcha
::
className
(),
[
'options'
=>
[
'class'
=>
'form-control'
],
'template'
=>
'<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>'
,
])
?>
<div
class=
"form-group"
>
...
...
framework/CHANGELOG.md
View file @
4148912b
...
...
@@ -39,6 +39,7 @@ Yii Framework 2 Change Log
-
Enh: Support for file aliases in console command 'message' (omnilight)
-
Enh: Sort and Pagination can now create absolute URLs (cebe)
-
Chg #1610:
`Html::activeCheckboxList()`
and
`Html::activeRadioList()`
will submit an empty string if no checkbox/radio is selected (qiangxue)
-
Chg #1643: Added default value for
`Captcha::options`
(qiangxue)
-
Chg: Renamed
`yii\jui\Widget::clientEventsMap`
to
`clientEventMap`
(qiangxue)
-
Chg: Renamed
`ActiveRecord::getPopulatedRelations()`
to
`getRelatedRecords()`
(qiangxue)
-
Chg: Renamed
`attributeName`
and
`className`
to
`targetAttribute`
and
`targetClass`
for
`UniqueValidator`
and
`ExistValidator`
(qiangxue)
...
...
framework/yii/captcha/Captcha.php
View file @
4148912b
...
...
@@ -48,6 +48,10 @@ class Captcha extends InputWidget
* while `{input}` will be replaced with the text input tag.
*/
public
$template
=
'{image} {input}'
;
/**
* @var array the HTML attributes for the input tag.
*/
public
$options
=
[
'class'
=>
'form-control'
];
/**
* Initializes the widget.
...
...
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