[Bps-public-commit] r20297 - RT-Authen-PAUSE/html/Callbacks/PAUSE/Elements/Login

trs at bestpractical.com trs at bestpractical.com
Wed Aug 24 11:51:00 EDT 2011


Author: trs
Date: Wed Aug 24 11:50:59 2011
New Revision: 20297

Modified:
   RT-Authen-PAUSE/html/Callbacks/PAUSE/Elements/Login/BeforeForm

Log:
Use some JS hackery to get around the lack of a callback where we need it

If the JS doesn't run, it's not the end of the world.

Modified: RT-Authen-PAUSE/html/Callbacks/PAUSE/Elements/Login/BeforeForm
==============================================================================
--- RT-Authen-PAUSE/html/Callbacks/PAUSE/Elements/Login/BeforeForm	(original)
+++ RT-Authen-PAUSE/html/Callbacks/PAUSE/Elements/Login/BeforeForm	Wed Aug 24 11:50:59 2011
@@ -1,4 +1,14 @@
+<div id="for-authors">
 <h3><% loc('For CPAN authors') %></h3>
 <p>
 <% loc('You can use the form below to log in with your PAUSE userid and password.') %>
 </p>
+</div>
+<script type="text/javascript">
+Event.observe(window, 'load', function() {
+    var authors = document.getElementById("for-authors");
+    var login = document.getElementById("login");
+    authors.parentNode.removeChild(authors);
+    login.insertBefore(authors, login.firstChild);
+});
+</script>



More information about the Bps-public-commit mailing list