浏览代码

Move some HTML out of core (src/login.php)

pdontthink 17 年之前
父节点
当前提交
11323e47da
共有 4 个文件被更改,包括 8 次插入13 次删除
  1. 0 4
      plugins/demo/setup.php
  2. 0 7
      src/login.php
  3. 4 1
      templates/default/login.tpl
  4. 4 1
      templates/default_advanced/login.tpl

+ 0 - 4
plugins/demo/setup.php

@@ -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';

+ 0 - 7
src/login.php

@@ -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.

+ 4 - 1
templates/default/login.tpl

@@ -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>

+ 4 - 1
templates/default_advanced/login.tpl

@@ -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>