44 lines
1.8 KiB
PHP
44 lines
1.8 KiB
PHP
<?php
|
|
use_helper('stAdminGenerator');
|
|
$catalogue = isset($i18n_catalogue) ? $i18n_catalogue : 'stAdminGeneratorPlugin';
|
|
?>
|
|
<?php if ($sf_flash->has('info')): ?>
|
|
<div class="message message-info">
|
|
<?php echo st_admin_get_icon('info-alert') ?>
|
|
<?php echo __($sf_flash->get('info'), null, $catalogue) ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php if ($sf_flash->has('warning')): ?>
|
|
<div class="message message-warning">
|
|
<?php echo st_admin_get_icon('warning-alert') ?>
|
|
<?php echo __($sf_flash->get('warning'), null, $catalogue) ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php if ($sf_flash->has('success') || $sf_flash->has('notice')): ?>
|
|
<div class="message message-success">
|
|
<?php echo st_admin_get_icon('check-alert') ?>
|
|
<?php echo __($sf_flash->has('success') ? $sf_flash->get('success') : $sf_flash->get('notice'), null, $catalogue) ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php if ($sf_flash->has('error')): ?>
|
|
<div class="message message-error">
|
|
<?php echo st_admin_get_icon('error-alert') ?>
|
|
<?php echo __($sf_flash->get('error'), null, $catalogue) ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php if ($sf_request->hasErrors()): ?>
|
|
<div class="form-errors">
|
|
<h2>
|
|
<?php echo st_admin_get_icon('error-alert') ?>
|
|
<?php echo __('Correct the data in the form.', null, 'stAdminGeneratorPlugin') ?>
|
|
</h2>
|
|
<?php if (isset($labels) && $labels && count(array_intersect_key($sf_request->getErrors(), $labels)) > 0): ?>
|
|
<dl>
|
|
<?php foreach ($sf_request->getErrorNames() as $name): if (!isset($labels[$name])) continue ?>
|
|
<dt><?php echo __($labels[$name], null, $catalogue) ?></dt>
|
|
<dd><?php echo __($sf_request->getError($name), null, $catalogue) ?></dd>
|
|
<?php endforeach; ?>
|
|
</dl>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|