Merge pull request #5593 from relldoesphp/CRM-15992
[civicrm-core.git] / templates / CRM / Form / validate.tpl
index 42204c30b063edc1c5225190724f5b6b3cdf2237..a2092509896df858cd8bdff823a3aadabe1a4057 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 *}
 {* Initialize jQuery validate on a form *}
 {* Extra params and functions may be added to the CRM.validate object before this template is loaded *}
-{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formName}
+{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formClass}
   {assign var=crm_form_validate_included value=1}
-
   {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      $("#{$form.formName}").crmValidate();
+      $("form.{/literal}{$form.formClass}{literal}").crmValidate();
     });
   </script>
   {/literal}