Permalink
Browse files

has-errors class now gets properly set

  • Loading branch information...
1 parent 9ec47e7 commit 773dc9187a6c6505919d5e98df448af6de894a02 @Zeelot committed Sep 8, 2010
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Button Element -->
-<div class="yform-item yform-button<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-button<?php echo empty($messages['errors']) ? '' : ' has-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<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-reset<?php echo empty($messages['errors']) ? '' : ' has-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<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-submit<?php echo empty($messages['errors']) ? '' : ' has-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<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<fieldset class="yform-item yform-checkboxGroup<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if( ! empty($label)): ?>
<legend><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></legend>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_RadioGroup Element -->
-<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<fieldset class="yform-item yform-radioGroup<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if( ! empty($label)): ?>
<legend><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></legend>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Select Element -->
-<div class="yform-item yform-select<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-select<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></label>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Checkbox Element -->
-<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-checkbox<?php echo empty($messages['errors']) ? '' : ' has-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<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-hidden<?php echo empty($messages['errors']) ? '' : ' has-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_Password Element -->
-<div class="yform-item yform-password<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-password<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></label>
<?php endif; ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Radio Element -->
-<div class="yform-item yform-radio<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-radio<?php echo empty($messages['errors']) ? '' : ' has-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>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Text Element -->
-<div class="yform-item yform-text<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-text<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></label>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Textarea Element -->
-<div class="yform-item yform-textarea<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-textarea<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></label>
<?php endif; ?>
@@ -1,6 +1,6 @@
<!-- BEGIN YForm_Upload Element -->
-<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
+<div class="yform-item yform-upload<?php echo empty($messages['errors']) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?><?php if ($object->get('required') !== FALSE): ?><span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span><?php endif; ?></label>

0 comments on commit 773dc91

Please sign in to comment.