Fix logging in with Alpha2.
authorJan Schneider <jan@horde.org>
Fri, 12 Nov 2010 21:58:53 +0000 (22:58 +0100)
committerJan Schneider <jan@horde.org>
Fri, 12 Nov 2010 21:59:07 +0000 (22:59 +0100)
For the record:
- forms are automatically submitted through ajax now, if not (globally) specified otherwise.
- Most form elements are replaced, this means that for example submit buttons don't submit any values.

horde/templates/login/mobile.inc

index c0698fd..6add662 100644 (file)
@@ -1,3 +1,12 @@
+<script type="text/javascript">
+$.mobile.ajaxFormsEnabled = false;
+$(function() {
+    $('#horde-login-button').click(function() {
+        $('#horde-login-post').val(1);
+        $(this).closest('form').submit();
+    });
+});
+</script>
 </head>
 <body>
 
@@ -11,6 +20,7 @@
   <input type="hidden" name="anchor_string" value="<?php echo htmlspecialchars(strval($vars->anchor_string)) ?>">
   <input type="hidden" name="app" value="<?php echo htmlspecialchars($vars->app) ?>">
   <input type="hidden" name="url" value="<?php echo htmlspecialchars($vars->url) ?>">
+  <input type="hidden" id="horde-login-post" name="login_post">
 
   <fieldset>
 <?php
@@ -44,7 +54,7 @@ foreach ($loginparams as $key => $val) {
   </fieldset>
 
   <fieldset data-role="controlgroup">
-    <input type="submit" data-theme="a" name="login_button" value="<?php echo htmlspecialchars($title) ?>">
+    <input type="button" data-theme="a" id="horde-login-button" value="<?php echo htmlspecialchars($title) ?>">
   </fieldset>
 
 </form>