Permalink
Browse files

fixes mensajes de error y flashes

  • Loading branch information...
1 parent 05080dd commit 9ee3c14f39a7c354cee31c0d875b5551953afe5f @ftoledo ftoledo committed Apr 19, 2012
Showing with 14 additions and 4 deletions.
  1. +11 −0 apps/principal/templates/_errores.php
  2. +3 −4 apps/principal/templates/_flashes.php
View
11 apps/principal/templates/_errores.php
@@ -0,0 +1,11 @@
+<?php if ($sf_request->hasErrors()): ?>
+ <div class="form-errors">
+ <h2><?php echo __('The form is not valid because it contains some errors.') ?></h2>
+ <dl>
+ <?php foreach ($sf_request->getErrorNames() as $name): ?>
+ <dt><?php //echo __($labels[$name]) ?></dt>
+ <dd><?php echo __($sf_request->getError($name)) ?></dd>
+ <?php endforeach; ?>
+ </dl>
+ </div>
+<?php endif; ?>
View
7 apps/principal/templates/_flashes.php
@@ -1,17 +1,16 @@
<?php if ($sf_user->hasFlash('notice')): ?>
<div class="notice"><?php echo __($sf_user->getFlash('notice'), array(), 'sf_admin') ?></div>
<?php endif; ?>
-
<?php if ($sf_user->hasFlash('error')): ?>
<div class="error"><?php echo __($sf_user->getFlash('error'), array(), 'sf_admin') ?></div>
<?php endif; ?>
<?php if ($sf_request->hasErrors()): ?>
<div class="form-errors">
<h2><?php echo __('There are some errors that prevent the form to validate') ?></h2>
- <ul>
+ <dl>
<?php foreach ($sf_request->getErrorNames() as $name): ?>
- <li title="<?php echo $name?>"><?php echo $sf_request->getError($name) ?></li>
+ <dd title="<?php echo $name?>"><?php echo $sf_request->getError($name) ?></dd>
<?php endforeach; ?>
- </ul>
+ </dl>
</div>
<?php endif;?>

0 comments on commit 9ee3c14

Please sign in to comment.