Skip to content

Commit

Permalink
the container div will now gain a class of has-errors if the array of…
Browse files Browse the repository at this point in the history
… error messages is now empty, this was previously called 'errors' but led to a bit of confusion
  • Loading branch information
zeelot committed Jul 19, 2010
1 parent e3b97d8 commit 4513f98
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion views/yform/themes/default/button/reset.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Reset Element -->
<div class="yform-item yform-reset<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-reset<?php echo empty($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): ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/button/submit.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Submit Element -->
<div class="yform-item yform-submit<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-submit<?php echo empty($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): ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/choice/checkboxGroup.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_CheckboxGroup Element -->
<fieldset class="yform-item yform-checkboxGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<fieldset class="yform-item yform-checkboxGroup<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">

<?php if( ! empty($label)): ?>
<legend>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/choice/radioGroup.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_RadioGroup Element -->
<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">

<?php if( ! empty($label)): ?>
<legend>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/choice/select.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Select Element -->
<div class="yform-item yform-select<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-select<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">

<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" >
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/checkbox.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Checkbox Element -->
<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<input <?php echo HTML::attributes($attributes); ?>/>

<?php if ( ! empty($label)): ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/hidden.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Hidden Element -->
<div class="yform-item yform-hidden<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-hidden<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<input <?php echo HTML::attributes($attributes); ?>/>

<?php foreach ($messages as $type => $array): ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/password.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Password Element -->
<div class="yform-item yform-password<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-password<?php echo empty($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; ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/radio.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Radio Element -->
<div class="yform-item yform-radio<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-radio<?php echo empty($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>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/text.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Text Element -->
<div class="yform-item yform-text<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-text<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">

<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" >
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/textarea.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Textarea Element -->
<div class="yform-item yform-textarea<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-textarea<?php echo empty($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; ?>
Expand Down
2 changes: 1 addition & 1 deletion views/yform/themes/default/input/upload.php
@@ -1,6 +1,6 @@

<!-- BEGIN YForm_Upload Element -->
<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">

<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" >
Expand Down

0 comments on commit 4513f98

Please sign in to comment.