Make login form input fields configurable again (see Password Forget plugin)
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 31 Oct 2008 02:41:38 +0000 (02:41 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 31 Oct 2008 02:41:38 +0000 (02:41 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13318 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/login.php
templates/default/login.tpl
templates/default_advanced/login.tpl

index 8665b2eee84fe47d6f866943aa20e471517d9bd6..10566952ec68ca0fa542c11dc7c67f133cc74ccd 100644 (file)
@@ -59,6 +59,8 @@ if($imap_auth_mech == 'login') {
     }
 }
 
+$username_form_name = 'login_username';
+$password_form_name = 'secretkey';
 do_hook('login_cookie', $null);
 
 $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '');
index 15a2584cd93036aa0a6702e938816c3608e306dc..281a75e66d3b9dc9cef5897b63da6f8f7ba2a53f 100644 (file)
@@ -51,7 +51,7 @@ extract($t);
    <?php echo _("Name:"); ?>
   </td>
   <td class="sqm_loginFieldInput">
-   <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" onfocus="alreadyFocused=true;" />
+   <input type="text" name="<?php global $username_form_name; echo $username_form_name; ?>" value="<?php echo $login_field_value; ?>" id="login_username" onfocus="alreadyFocused=true;" />
   </td>
  </tr>
  <tr>
@@ -59,7 +59,7 @@ extract($t);
    <?php echo _("Password:"); ?>
   </td>
   <td class="sqm_loginFieldInput">
-   <input type="password" name="secretkey" value="" id="secretkey" onfocus="alreadyFocused=true;" />
+   <input type="password" name="<?php global $password_form_name; echo $password_form_name; ?>" value="" id="secretkey" onfocus="alreadyFocused=true;" />
    <?php echo $login_extra; ?>
   </td>
  </tr>
index 1ab48558f0880a3e9a52ffd56ce4cc9f84be8562..72aa9fd3838f94c02151e3eb7ee0fe8891b07d0c 100644 (file)
@@ -61,7 +61,7 @@ extract($t);
       <?php echo _("Name:"); ?>
      </td>
      <td class="fieldInput">
-      <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" onfocus="alreadyFocused=true;" />
+      <input type="text" name="<?php global $username_form_name; echo $username_form_name; ?>" value="<?php echo $login_field_value; ?>" id="login_username" class="input" onfocus="alreadyFocused=true;" />
      </td>
     </tr>
     <tr>
@@ -69,7 +69,7 @@ extract($t);
       <?php echo _("Password:"); ?>
      </td>
      <td class="fieldInput">
-      <input type="password" name="secretkey" value="" id="secretkey" class="input" onfocus="alreadyFocused=true;" />
+      <input type="password" name="<?php global $password_form_name; echo $password_form_name; ?>" value="" id="secretkey" class="input" onfocus="alreadyFocused=true;" />
       <?php echo $login_extra; ?>
      </td>
     </tr>