Skip to content
This repository
Browse code

the container div will now gain a class of has-errors if the array of…

… error messages is now empty, this was previously called 'errors' but led to a bit of confusion
  • Loading branch information...
commit 4513f98b3efa04ce8990f2406738e6a1de592abd 1 parent e3b97d8
Lorenzo Pisani authored
2  views/yform/themes/default/button/reset.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Reset Element -->
3   -<div class="yform-item yform-reset<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-reset<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <button <?php echo HTML::attributes($attributes); ?>><?php echo (empty($label))?'':$label; ?></button>
5 5
6 6 <?php foreach ($messages as $type => $array): ?>
2  views/yform/themes/default/button/submit.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Submit Element -->
3   -<div class="yform-item yform-submit<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-submit<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <button <?php echo HTML::attributes($attributes); ?>><?php echo (empty($label))?'':$label;?></button>
5 5
6 6 <?php foreach ($messages as $type => $array): ?>
2  views/yform/themes/default/choice/checkboxGroup.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_CheckboxGroup Element -->
3   -<fieldset class="yform-item yform-checkboxGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<fieldset class="yform-item yform-checkboxGroup<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4
5 5 <?php if( ! empty($label)): ?>
6 6 <legend>
2  views/yform/themes/default/choice/radioGroup.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_RadioGroup Element -->
3   -<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<fieldset class="yform-item yform-radioGroup<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4
5 5 <?php if( ! empty($label)): ?>
6 6 <legend>
2  views/yform/themes/default/choice/select.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Select Element -->
3   -<div class="yform-item yform-select<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-select<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4
5 5 <?php if ( ! empty($label)): ?>
6 6 <label for="<?php echo Arr::get($attributes, 'id'); ?>" >
2  views/yform/themes/default/input/checkbox.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Checkbox Element -->
3   -<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-checkbox<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <input <?php echo HTML::attributes($attributes); ?>/>
5 5
6 6 <?php if ( ! empty($label)): ?>
2  views/yform/themes/default/input/hidden.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Hidden Element -->
3   -<div class="yform-item yform-hidden<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-hidden<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <input <?php echo HTML::attributes($attributes); ?>/>
5 5
6 6 <?php foreach ($messages as $type => $array): ?>
2  views/yform/themes/default/input/password.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Password Element -->
3   -<div class="yform-item yform-password<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-password<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <?php if ( ! empty($label)): ?>
5 5 <label for="<?php echo Arr::get($attributes, 'id'); ?>" >
6 6 <?php echo $label; ?>
2  views/yform/themes/default/input/radio.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Radio Element -->
3   -<div class="yform-item yform-radio<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-radio<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <input <?php echo HTML::attributes($attributes); ?>/>
5 5 <?php if ( ! empty($label)): ?>
6 6 <label for="<?php echo Arr::get($attributes, 'id'); ?>" ><?php echo $label; ?></label>
2  views/yform/themes/default/input/text.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Text Element -->
3   -<div class="yform-item yform-text<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-text<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4
5 5 <?php if ( ! empty($label)): ?>
6 6 <label for="<?php echo Arr::get($attributes, 'id'); ?>" >
2  views/yform/themes/default/input/textarea.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Textarea Element -->
3   -<div class="yform-item yform-textarea<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-textarea<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4 <?php if ( ! empty($label)): ?>
5 5 <label for="<?php echo Arr::get($attributes, 'id'); ?>" >
6 6 <?php echo $label; ?>
2  views/yform/themes/default/input/upload.php
... ... @@ -1,6 +1,6 @@
1 1
2 2 <!-- BEGIN YForm_Upload Element -->
3   -<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
  3 +<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
4 4
5 5 <?php if ( ! empty($label)): ?>
6 6 <label for="<?php echo Arr::get($attributes, 'id'); ?>" >

0 comments on commit 4513f98

Please sign in to comment.
Something went wrong with that request. Please try again.