Merge pull request #5593 from relldoesphp/CRM-15992
[civicrm-core.git] / templates / CRM / Form / validate.tpl
index 852a2b7c2177c1d36df049b16b3625a12c69dc32..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($) {
-      $("#{/literal}{$form.formName}{literal}").crmValidate();
+      $("form.{/literal}{$form.formClass}{literal}").crmValidate();
     });
   </script>
   {/literal}