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
293cb9d8
Commit
293cb9d8
authored
Oct 04, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed search form.
parent
65b8cc21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
_search.php
...ework/yii/gii/generators/crud/templates/views/_search.php
+4
-1
DataColumn.php
framework/yii/grid/DataColumn.php
+1
-1
BaseHtml.php
framework/yii/helpers/BaseHtml.php
+1
-1
Request.php
framework/yii/web/Request.php
+1
-0
No files found.
framework/yii/gii/generators/crud/templates/views/_search.php
View file @
293cb9d8
...
@@ -23,7 +23,10 @@ use yii\widgets\ActiveForm;
...
@@ -23,7 +23,10 @@ use yii\widgets\ActiveForm;
<div
class=
"
<?php
echo
Inflector
::
camel2id
(
StringHelper
::
basename
(
$generator
->
modelClass
));
?>
-search"
>
<div
class=
"
<?php
echo
Inflector
::
camel2id
(
StringHelper
::
basename
(
$generator
->
modelClass
));
?>
-search"
>
<?php
echo
'<?php'
;
?>
$form = ActiveForm::begin(array('method' => 'get')); ?>
<?php
echo
'<?php'
;
?>
$form = ActiveForm::begin(array(
'action' => array('index'),
'method' => 'get',
)); ?>
<?php
<?php
$count
=
0
;
$count
=
0
;
...
...
framework/yii/grid/DataColumn.php
View file @
293cb9d8
...
@@ -73,7 +73,7 @@ class DataColumn extends Column
...
@@ -73,7 +73,7 @@ class DataColumn extends Column
* the [[filter]] property. When [[filter]] is not set or is an array, this property will be used to
* the [[filter]] property. When [[filter]] is not set or is an array, this property will be used to
* render the HTML attributes for the generated filter input fields.
* render the HTML attributes for the generated filter input fields.
*/
*/
public
$filterInputOptions
=
array
(
'class'
=>
'form-control'
);
public
$filterInputOptions
=
array
(
'class'
=>
'form-control'
,
'id'
=>
null
);
protected
function
renderHeaderCellContent
()
protected
function
renderHeaderCellContent
()
...
...
framework/yii/helpers/BaseHtml.php
View file @
293cb9d8
...
@@ -237,7 +237,7 @@ class BaseHtml
...
@@ -237,7 +237,7 @@ class BaseHtml
$hiddenInputs
[]
=
static
::
hiddenInput
(
$request
->
restVar
,
$method
);
$hiddenInputs
[]
=
static
::
hiddenInput
(
$request
->
restVar
,
$method
);
$method
=
'post'
;
$method
=
'post'
;
}
}
if
(
$request
->
enableCsrfValidation
)
{
if
(
$request
->
enableCsrfValidation
&&
!
strcasecmp
(
$method
,
'post'
)
)
{
$hiddenInputs
[]
=
static
::
hiddenInput
(
$request
->
csrfVar
,
$request
->
getCsrfToken
());
$hiddenInputs
[]
=
static
::
hiddenInput
(
$request
->
csrfVar
,
$request
->
getCsrfToken
());
}
}
}
}
...
...
framework/yii/web/Request.php
View file @
293cb9d8
...
@@ -77,6 +77,7 @@ class Request extends \yii\base\Request
...
@@ -77,6 +77,7 @@ class Request extends \yii\base\Request
*/
*/
const
CSRF_HEADER
=
'X-CSRF-Token'
;
const
CSRF_HEADER
=
'X-CSRF-Token'
;
/**
/**
* @var boolean whether to enable CSRF (Cross-Site Request Forgery) validation. Defaults to true.
* @var boolean whether to enable CSRF (Cross-Site Request Forgery) validation. Defaults to true.
* When CSRF validation is enabled, forms submitted to an Yii Web application must be originated
* When CSRF validation is enabled, forms submitted to an Yii Web application must be originated
...
...
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