def validate_property
if java_definition
validation_result = java_definition.validate(text_value)
- errors.add_to_base(validation_result.getErrorKey()) unless validation_result.isValid()
+ errors.add_to_base(validation_result.errorKey) unless validation_result.isValid()
end
end
def validate_field
if java_field_definition
validation_result = java_field_definition.validate(text_value)
- errors.add_to_base(validation_result.getErrorKey()) unless validation_result.isValid()
+ errors.add_to_base(validation_result.errorKey) unless validation_result.isValid()
end
end
end
+<% errors = [] -%>
+
<tr class="multi_value <%= 'template' unless set_key -%>" style="<%= 'display:none' unless set_key -%>">
<td><%= text_field_tag "property_sets[#{property.key}][]", set_key, :size => 50 -%></td>
<% value = Property.value(key, resource_id) if set_key -%>
<td><%= render "settings/type_#{field.type}", :property => field, :field => field, :value => value, :name => "#{property.key}[#{field.key}][]", :id => "input_#{h field.key}" -%></td>
+
+ <% errors << (render "settings/error", :key => key) if set_key -%>
<% end -%>
<td><a href="#" class="delete link-action"><%= message('delete') -%></a></td>
</tr>
+
+<% unless errors.all?(&:blank?) -%>
+ <tr>
+ <td></td>
+ <% errors.each do |error| -%>
+ <td><%= error -%></td>
+ <% end -%>
+ <td></td>
+ </tr>
+<% end -%>
<tr>
<th><%= message('key') -%></th>
<% property.fields.each do |field| -%>
- <th><%= field_name(property, field) -%></th>
+ <th>
+ <%= field_name(property, field) -%>
+ <% desc = field_description(property, field) -%>
+ <% unless desc.blank? %>
+ <p class="note"><%= desc -%></p>
+ <% end -%>
+ </th>
<% end -%>
<th></th>
</tr>