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 8665b2e..1056695 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) : '');
 do_hook('login_cookie', $null);
 
 $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '');
index 15a2584..281a75e 100644 (file)
@@ -51,7 +51,7 @@ extract($t);
    <?php echo _("Name:"); ?>
   </td>
   <td class="sqm_loginFieldInput">
    <?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>
   </td>
  </tr>
  <tr>
@@ -59,7 +59,7 @@ extract($t);
    <?php echo _("Password:"); ?>
   </td>
   <td class="sqm_loginFieldInput">
    <?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>
    <?php echo $login_extra; ?>
   </td>
  </tr>
index 1ab4855..72aa9fd 100644 (file)
@@ -61,7 +61,7 @@ extract($t);
       <?php echo _("Name:"); ?>
      </td>
      <td class="fieldInput">
       <?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>
      </td>
     </tr>
     <tr>
@@ -69,7 +69,7 @@ extract($t);
       <?php echo _("Password:"); ?>
      </td>
      <td class="fieldInput">
       <?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>
       <?php echo $login_extra; ?>
      </td>
     </tr>