Permalink
Browse files

added the errors class to the container for the remaining elements

  • Loading branch information...
1 parent 3b785ff commit e3b97d8a4cbf47ada5f3919ba93fa1e41da9686c @Zeelot committed Jul 19, 2010
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Button Element -->
-<div class="yform-item yform-button" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-button<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<button <?php echo HTML::attributes($attributes); ?>><?php echo (empty($label))?'':$label; ?></button>
<?php foreach ($messages as $type => $array): ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Reset Element -->
-<div class="yform-item yform-reset" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-reset<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<button <?php echo HTML::attributes($attributes); ?>><?php echo (empty($label))?'':$label; ?></button>
<?php foreach ($messages as $type => $array): ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Submit Element -->
-<div class="yform-item yform-submit" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-submit<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<button <?php echo HTML::attributes($attributes); ?>><?php echo (empty($label))?'':$label;?></button>
<?php foreach ($messages as $type => $array): ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_CheckboxGroup Element -->
-<fieldset class="yform-item yform-checkboxGroup" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<fieldset class="yform-item yform-checkboxGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if( ! empty($label)): ?>
<legend>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_RadioGroup Element -->
-<fieldset class="yform-item yform-radioGroup" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if( ! empty($label)): ?>
<legend>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Checkbox Element -->
-<div class="yform-item yform-checkbox" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<input <?php echo HTML::attributes($attributes); ?>/>
<?php if ( ! empty($label)): ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Hidden Element -->
-<div class="yform-item yform-hidden" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-hidden<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<input <?php echo HTML::attributes($attributes); ?>/>
<?php foreach ($messages as $type => $array): ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Radio Element -->
-<div class="yform-item yform-radio" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-radio<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<input <?php echo HTML::attributes($attributes); ?>/>
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?></label>

0 comments on commit e3b97d8

Please sign in to comment.