Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only show help span when there are errors

  • Loading branch information...
commit 8f8c891935b550c43c8a6e6c2971f1e1bb663177 1 parent 7db1f07
@trecloux trecloux authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 app/views/Home/connected.html
View
8 app/views/Home/connected.html
@@ -23,28 +23,36 @@
<label for="event.name">Name</label>
<div class="input">
<input class="xlarge ${errors.forKey('event.name') ? 'error' : ''}" type="text" name="event.name" id="event.name" value="${event ? event.name : flash['event.name']}" />
+ #{ifError 'event.name'}
<span class="help-inline">#{error 'event.name'/}</span>
+ #{/ifError}
</div>
</div>
<div class="clearfix ${errors.forKey('event.dayOfMonth') ? 'error' : ''}">
<label for="event.dayOfMonth">Day of month</label>
<div class="input">
<input class="${errors.forKey('event.dayOfMonth') ? 'error' : ''}" type="event.dayOfMonth" name="event.dayOfMonth" id="event.dayOfMonth" value="${event ? event.dayOfMonth : flash['event.dayOfMonth']}"/>
+ #{ifError 'event.dayOfMonth'}
<span class="help-inline">#{error 'event.dayOfMonth'/}</span>
+ #{/ifError}
</div>
</div>
<div class="clearfix ${errors.forKey('event.monthOfYear') ? 'error' : ''}">
<label for="event.monthOfYear">Month of year</label>
<div class="input">
<input class="${errors.forKey('event.monthOfYear') ? 'error' : ''}" type="event.monthOfYear" name="event.monthOfYear" id="event.monthOfYear" value="${event ? event.monthOfYear : flash['event.monthOfYear']}" />
+ #{ifError 'event.monthOfYear'}
<span class="help-inline">#{error 'event.monthOfYear'/}</span>
+ #{/ifError}
</div>
</div>
<div class="clearfix ${errors.forKey('reminder.numberOfDaysBeforeEvent') ? 'error' : ''}">
<label for="reminder.numberOfDaysBeforeEvent">Alert me x days before event</label>
<div class="input">
<input class="${errors.forKey('reminder.numberOfDaysBeforeEvent') ? 'error' : ''}" type="reminder.numberOfDaysBeforeEvent" name="reminder.numberOfDaysBeforeEvent" id="reminder.numberOfDaysBeforeEvent" value="${event ? reminder.numberOfDaysBeforeEvent : flash['reminder.numberOfDaysBeforeEvent']}"/>
+ #{ifError 'reminder.numberOfDaysBeforeEvent'}
<span class="help-inline">#{error 'reminder.numberOfDaysBeforeEvent'/}</span>
+ #{/ifError}
</div>
</div>
<div class="actions">
Please sign in to comment.
Something went wrong with that request. Please try again.