From e60ba7ee618d4409d9ba264bfb77d981a37cfad7 Mon Sep 17 00:00:00 2001 From: bn8 Date: Thu, 15 Apr 2010 18:21:18 +0200 Subject: [PATCH] LSform/js : Fixed bug in LSerrors reporting. --- public_html/includes/js/LSform.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public_html/includes/js/LSform.js b/public_html/includes/js/LSform.js index 20c11f08..a6e18a83 100644 --- a/public_html/includes/js/LSform.js +++ b/public_html/includes/js/LSform.js @@ -244,8 +244,10 @@ var LSform = new Class({ dd.injectAfter(this.getParent()); },ul); - var dt = ul.getParent().getPrevious('dt'); - dt.addClass('LSform-errors'); + var dt = ul.getParent('dd.LSform').getPrevious('dt'); + if ($type(dt)) { + dt.addClass('LSform-errors'); + } var layout = ul.getParent('div.LSform_layout_active'); if ($type(layout)) {