PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/mig/images/widgets/kunet-login.app

http://migrid.googlecode.com/
Unknown | 50 lines | 50 code | 0 blank | 0 comment | 0 complexity | 4926a63cd3e13f41b876e7a64c799655 MD5 | raw file
Possible License(s): IPL-1.0, GPL-2.0, GPL-3.0, MPL-2.0-no-copyleft-exception, JSON
  1. <!--
  2. Name: KUnet Login
  3. Description: Basic KUnet login wrapper to avoid repeated typing of silly username
  4. Requires: jquery.js
  5. -->
  6. <script type="text/javascript">
  7. $(document).ready(function() {
  8. /*
  9. IMPORTANT: KU occasionally changes beween a 'secret' formdir
  10. variable value of 5, 6 or 8. Change below if login fails with page error.
  11. */
  12. var formdir="6";
  13. /*
  14. Specify your auto-generated KU username once and for all here
  15. to avoid having to remember it.
  16. Optionally you can add your password as well, but please
  17. beware that it will be saved in *unencrypted* form on the MiG
  18. server then. This still means that it will be certificate
  19. protected from anyone but the MiG admins.
  20. **************************************************************
  21. * Save the password at your own risk - You have been warned! *
  22. **************************************************************
  23. */
  24. var username="INSERT_YOUR_KU_USERNAME_HERE";
  25. var password="";
  26. /*** No more script changes should be needed after this line ***/
  27. /* Load KUNet login helper script */
  28. var auth_url = "https://intranet.ku.dk/CookieAuth.dll";
  29. var script_url = auth_url+"?GetPic?formdir="+formdir+"&image=flogon.js";
  30. var script = document.createElement("script");
  31. script.setAttribute("type","text/javascript");
  32. script.setAttribute("src", script_url);
  33. document.getElementsByTagName("head")[0].appendChild(script);
  34. var login_url = auth_url+"?Logon";
  35. $(".kunetlogin").html('<h2>KUnet login</h2><form action="'+login_url+'" method="post" id="logonForm" ><input id="rdoPrvt" type="hidden" name="trusted" value="4" />username:<br /><input class="logininput" type="text" size="10" id="username" name="username" value="'+username+'" /><br />password:<br /><input class="logininput" id="password" name="password" type="password" size="10" value="'+password+'"><input type="hidden" id="curl" name="curl" value="Z2FSiderZ2Fdefault.aspx" /><input type="hidden" id="flags" name="flags" value="0" /><input type="hidden" id="forcedownlevel" name="forcedownlevel" value="0" /><input type="hidden" id="formdir" name="formdir" value="'+formdir+'" /><input class="logininput loginsubmit" type="submit" value="Log in" onclick="clkLgn()" /></form>');
  36. });
  37. </script>
  38. <div id="content">
  39. <div class="kunetlogin smallcontent">
  40. <p>Please enable Javascript to view this kunetlogin widget.</p>
  41. </div>
  42. <div class="kunetlinks smallcontent">
  43. <!---
  44. You may want to add one or more links to e.g. Absalon pages
  45. here for easy access. That will provide easy access to
  46. e.g. forum pages that otherwise time out frequently and force
  47. repeated login.
  48. --->
  49. </div>
  50. </div>