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 14db159..5c99b1b 100644 (file)
@@ -29,10 +29,6 @@ function squirrelmail_plugin_init_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 ef769f8..8665b2e 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 3b39015..15a2584 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 b89fe04..1ab4855 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>