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
ca752a64
Commit
ca752a64
authored
Jul 25, 2014
by
Kai Mindermann
Committed by
Alexander Makarov
Jul 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4410: Fixed Gii to preserve database column order in generated _form.php
parent
86d48ca9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CHANGELOG.md
extensions/gii/CHANGELOG.md
+1
-0
_form.php
extensions/gii/generators/crud/default/views/_form.php
+3
-1
No files found.
extensions/gii/CHANGELOG.md
View file @
ca752a64
...
@@ -8,6 +8,7 @@ Yii Framework 2 gii extension Change Log
...
@@ -8,6 +8,7 @@ Yii Framework 2 gii extension Change Log
-
Bug #2314: Gii model generator does not generate correct relation type in some special case (qiangxue)
-
Bug #2314: Gii model generator does not generate correct relation type in some special case (qiangxue)
-
Bug #3265: Fixed incorrect controller class name validation (suralc)
-
Bug #3265: Fixed incorrect controller class name validation (suralc)
-
Bug #3693: Fixed broken Gii preview when a file is unchanged (cebe)
-
Bug #3693: Fixed broken Gii preview when a file is unchanged (cebe)
-
Bug #4410: Fixed Gii to preserve database column order in generated _form.php (kmindi)
-
Enh #2018: Search model is not required anymore in CRUD generator (johonunu)
-
Enh #2018: Search model is not required anymore in CRUD generator (johonunu)
-
Enh #3088: The gii module will manage their own URL rules now (qiangxue)
-
Enh #3088: The gii module will manage their own URL rules now (qiangxue)
-
Enh #3222: Added
`useTablePrefix`
option to the model generator for Gii (horizons2)
-
Enh #3222: Added
`useTablePrefix`
option to the model generator for Gii (horizons2)
...
...
extensions/gii/generators/crud/default/views/_form.php
View file @
ca752a64
...
@@ -28,8 +28,10 @@ use yii\widgets\ActiveForm;
...
@@ -28,8 +28,10 @@ use yii\widgets\ActiveForm;
<?=
"<?php "
?>
$form = ActiveForm::begin(); ?>
<?=
"<?php "
?>
$form = ActiveForm::begin(); ?>
<?php
foreach
(
$safeAttributes
as
$attribute
)
{
<?php
foreach
(
$generator
->
getColumnNames
()
as
$attribute
)
{
if
(
in_array
(
$attribute
,
$safeAttributes
))
{
echo
" <?= "
.
$generator
->
generateActiveField
(
$attribute
)
.
" ?>
\n\n
"
;
echo
" <?= "
.
$generator
->
generateActiveField
(
$attribute
)
.
" ?>
\n\n
"
;
}
}
?>
}
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<?=
"<?= "
?>
Html::submitButton($model->isNewRecord ?
<?=
$generator
->
generateString
(
'Create'
)
?>
:
<?=
$generator
->
generateString
(
'Update'
)
?>
, ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
<?=
"<?= "
?>
Html::submitButton($model->isNewRecord ?
<?=
$generator
->
generateString
(
'Create'
)
?>
:
<?=
$generator
->
generateString
(
'Update'
)
?>
, ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
...
...
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