Fixes vim mode line.
[platal.git] / plugins / compiler.checkpasswd.php
index 714d3e2..d3f26b3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_compiler_checkpasswd($tag_attrs, &$compiler)
+function smarty_compiler_checkpasswd($tag_attrs, $compiler)
 {
     extract($compiler->_parse_attrs($tag_attrs));
     if (!isset($width)) {
@@ -35,13 +35,13 @@ function smarty_compiler_checkpasswd($tag_attrs, &$compiler)
       $text = "'Changer'";
     }
 
-    return '?><script type="text/javascript" src="javascript/jquery.color.js" ></script>
+    return '?><script type="text/javascript" src="' . pl_static_content_path("javascript/", "jquery.color.js") . '" ></script>
               <script type="text/javascript">//<![CDATA[
                 var passwordprompt_name = '.  $prompt . ';
                 var passwordprompt_submit = ' . $submit . ';
-                $(":input[@name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target, ' . $text . '); });
-                $(document).ready(function() {
-                  checkPassword($(":input[@name=' . $prompt . ']").get(0), ' . $text . ');
+                $(":input[name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target, ' . $text . '); });
+                $(function() {
+                  checkPassword($(":input[name=' . $prompt . ']").get(0), ' . $text . ');
                 });
               //]]></script>
               <div>
@@ -54,6 +54,6 @@ function smarty_compiler_checkpasswd($tag_attrs, &$compiler)
               </div><?php';
 }
 
-/* vim: set expandtab enc=utf-8: */
+/* vim:set expandtab fenc=utf-8: */
 
 ?>