]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/site.html.erb
Merge branch 'master' into openstreetbugs
[rails.git] / app / views / layouts / site.html.erb
index 6fc7cb869b039da766b2598e7e10f809da066013..a2cd2aa403b9493163805746057fc1b157e436f0 100644 (file)
 
       <% if false %>
       <div id="donate" class="notice">
-        <%= t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %>
+        <%= raw t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %>
       </div>
       <% end %>
 
     </div>
 
     <script type="text/javascript">
-    document.observe("dom:loaded", function () {
-      var auth_token = $$("meta[name=csrf-token]")[0].content;
+    $(document).ready(function () {
+      var auth_token = $("meta[name=csrf-token]").attr("content");
 
-      $$("form input[name=authenticity_token]").each(function (input) {
-        input.value = auth_token;
-      });
-    }
+      $("form input[name=authenticity_token]").val(auth_token);
+    });
     </script>
 
     <% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) -%>