Ignore:
Timestamp:
Apr 8, 2010, 6:02:16 PM (9 years ago)
Author:
duh
Message:
  • introduced template fields validation
  • added i18n messaging for validation errors
  • added template field validation support to subject fields in wizard
  • TODO: an unsetTemplateField(...) method should be added to TemplateEntity? and used in the wizard. As setting an empty value (=empty string) should result in the particular value be unset in the TemplateEntity? instance... This issue results now in not being able to unset previously set template fields.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/wizard/common/_error.gsp

    r299 r332  
    2828                // mark error fields
    2929                <g:each in="${errors}" var="error">
     30                var element = $("input:[name='${error.key}'], input:[name='${error.key.toLowerCase().replaceAll("([^a-z0-9])","_")}'], select:[name='${error.key}'], select:[name='${error.key.toLowerCase().replaceAll("([^a-z0-9])","_")}']");
    3031                <g:if test="${error.value['dynamic']}">
    31                 $("input:[name='${error.key}'], select:[name='${error.key}']").addClass('error');
     32                element.addClass('error');
    3233                </g:if><g:else>
    33                 $("input:[name='${error.key}'], select:[name='${error.key}']").parent().parent().addClass('error');
     34                element.parent().parent().addClass('error');
    3435                </g:else>
    3536                </g:each>
Note: See TracChangeset for help on using the changeset viewer.