Skip to content

Commit

Permalink
[#755] wrap name-one in fields-with-errors correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
al2o3cr committed Sep 26, 2011
1 parent 983c411 commit 6883fee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hobo/lib/hobo/rapid/taglibs/rapid_forms.dryml
Expand Up @@ -773,11 +773,13 @@ If you wish to set `min-chars` to 0, you will require this [patch to controls.js
min_chars ||= 1
value = name(:no_wrapper => true, :if_present => true)
-%>
<input type="text" name="#{param_name_for_this}"
class="autocompleter #{type_and_field._?.dasherize} #{css_data :complete_on, typed_id(complete_target), completer} #{css_data :min_chars, min_chars} #{'nil-value' if value==''}"
value="#{value=='' ? nil_value : value}"
merge-attrs/>
<div class="completions-popup" style="display:none"></div>
<wrap tag="span" class="field-with-errors" when="&!this_parent.errors[this_field].empty?">
<input type="text" name="#{param_name_for_this}"
class="autocompleter #{type_and_field._?.dasherize} #{css_data :complete_on, typed_id(complete_target), completer} #{css_data :min_chars, min_chars} #{'nil-value' if value==''}"
value="#{value=='' ? nil_value : value}"
merge-attrs/>
<div class="completions-popup" style="display:none"></div>
</wrap>
</def>


Expand Down

0 comments on commit 6883fee

Please sign in to comment.