Move some HTML out of core (src/login.php)
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 7 May 2008 17:04:03 +0000 (17:04 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 7 May 2008 17:04:03 +0000 (17:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13107 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/demo/setup.php
src/login.php
templates/default/login.tpl
templates/default_advanced/login.tpl

index 14db1594150ae01894ad362ae8c4b9fc9e79e93e..5c99b1b7dbc9dc3fc85277d8bd3c901fbc4aac95 100644 (file)
@@ -28,10 +28,6 @@ function squirrelmail_plugin_init_demo()
    $squirrelmail_plugin_hooks['login_cookie']['demo']
       = 'demo_login_cookie';
 
-//FIXME: not all of the above hooks are yet implemented below
-   $squirrelmail_plugin_hooks['login_top']['demo']
-      = 'demo_login_top';
-
 //FIXME: not all of the above hooks are yet implemented below
    $squirrelmail_plugin_hooks['login_bottom']['demo']
       = 'demo_login_bottom';
index ef769f85585b3f3e1c71f58e3e75ff5c0636142d..8665b2eee84fe47d6f866943aa20e471517d9bd6 100644 (file)
@@ -153,15 +153,8 @@ $oTemplate->assign('org_logo_str', sprintf (_("The %s logo"), $org_name));
 $oTemplate->assign('login_field_value', $loginname_value);
 $oTemplate->assign('login_extra', $login_extra, FALSE);
 
-//FIXME: need to remove *ALL* HTML from this file!
-echo '<body onload="squirrelmail_loginpage_onload()">'."\n";
-echo '<form name="login_form" id="login_form" action="redirect.php" method="post" onsubmit="document.login_form.js_autodetect_results.value='. SMPREF_JS_ON .'">'."\n";
-do_hook('login_top', $null);
-
 $oTemplate->display('login.tpl');
 
-//FIXME: need to remove *ALL* HTML from this file!
-echo "</form>\n";
 do_hook('login_bottom', $null);
 
 // Turn off delayed error handling to make sure all errors are dumped.
index 3b3901592b11fabf5faa7b789764c647eb10b025..15a2584cd93036aa0a6702e938816c3608e306dc 100644 (file)
@@ -28,7 +28,9 @@
 /* retrieve the template vars */
 extract($t);
 
-?>
+?><body onload="squirrelmail_loginpage_onload()">
+<form name="login_form" id="login_form" action="redirect.php" method="post" onsubmit="document.login_form.js_autodetect_results.value=1">
+<?php if (!empty($plugin_output['login_top'])) echo $plugin_output['login_top']; ?>
 <div id="sqm_login">
 <table cellspacing="0">
  <tr>
@@ -69,3 +71,4 @@ extract($t);
  </tr>
 </table>
 </div>
+</form>
index b89fe0425a23c545477879c098efcd96d05c1a07..1ab48558f0880a3e9a52ffd56ce4cc9f84be8562 100644 (file)
@@ -30,7 +30,9 @@
 /* retrieve the template vars */
 extract($t);
 
-?>
+?><body onload="squirrelmail_loginpage_onload()">
+<form name="login_form" id="login_form" action="redirect.php" method="post" onsubmit="document.login_form.js_autodetect_results.value=1">
+<?php if (!empty($plugin_output['login_top'])) echo $plugin_output['login_top']; ?>
 <div id="sqm_login">
 <table cellspacing="0">
  <tr>
@@ -82,3 +84,4 @@ extract($t);
  </tr>
 </table>
 </div>
+</form>