Browse Source

Merge pull request #993 from lucianobaraglia/master

More on GII buttons [skip ci]
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
eacfe0d004
  1. 2
      framework/yii/gii/generators/crud/templates/views/_form.php
  2. 4
      framework/yii/gii/views/default/view.php

2
framework/yii/gii/generators/crud/templates/views/_form.php

@ -36,7 +36,7 @@ use yii\widgets\ActiveForm;
echo "\t\t<?php echo " . $generator->generateActiveField($attribute) . " ?>\n\n";
} ?>
<div class="form-group">
<?php echo '<?php'; ?> echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', array('class' => 'btn btn-primary')); ?>
<?php echo '<?php'; ?> echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', array('class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary')); ?>
</div>
<?php echo '<?php'; ?> ActiveForm::end(); ?>

4
framework/yii/gii/views/default/view.php

@ -45,10 +45,10 @@ foreach ($generator->templates as $name => $path) {
Please select which set of the templates should be used to generated the code.
'); ?>
<div class="form-group">
<?php echo Html::submitButton('Preview', array('name' => 'preview', 'class' => 'btn btn-success')); ?>
<?php echo Html::submitButton('Preview', array('name' => 'preview', 'class' => 'btn btn-primary')); ?>
<?php if(isset($files)): ?>
<?php echo Html::submitButton('Generate', array('name' => 'generate', 'class' => 'btn btn-danger')); ?>
<?php echo Html::submitButton('Generate', array('name' => 'generate', 'class' => 'btn btn-success')); ?>
<?php endif; ?>
</div>
</div>

Loading…
Cancel
Save