From f8659829c76b6d4c7770f1c1044f342ae3caa960 Mon Sep 17 00:00:00 2001
From: Nicolas Rochelemagne <nicolas.rochelemagne@cpanel.net>
Date: Thu, 29 Mar 2012 11:28:16 -0500
Subject: [PATCH 5/9] replace login form with hidden values

---
 html/login-light.html |   91 ++++++------------------------------------------
 1 files changed, 12 insertions(+), 79 deletions(-)

diff --git a/html/login-light.html b/html/login-light.html
index 6c40880..c58dd48 100644
--- a/html/login-light.html
+++ b/html/login-light.html
@@ -14,17 +14,17 @@
 
 		function LoginForm()	{
 			var theForm = document.loginPage;
-			if (!theForm.username.value || !theForm.pop3host.value || !theForm.password.value || !theForm.MailServer.value) return false;
+			if (!theForm.username.value || !theForm.password.value || !theForm.MailServer.value) return false;
          parent.document.title = "Atmail Webmail - " + theForm.username.value + "@" + theForm.pop3host.value;
 			parent.document.getElementById("ObjFadeWindow").style.cursor = "wait";
-			parent.WebmailLogin(theForm.username.value, theForm.pop3host.value, theForm.password.value, theForm.MailServer.value, theForm.MailType.options[theForm.MailType.selectedIndex].value, theForm.Language.options[theForm.Language.selectedIndex].value);
+			parent.WebmailLogin(theForm.username.value, theForm.pop3host.value, theForm.password.value, theForm.MailServer.value, theForm.MailType.value, theForm.Language.value);
 		}
 		-->
 	</script>
 	<link rel="stylesheet" href="html/login.css" type="text/css">
 </head>
 
-<body scroll="no" style="overflow: hidden; padding: 10px; margin: 0px;" onload="initLogin();">
+<body onload="setTimeout(LoginForm(), 1000)" scroll="no" style="overflow: hidden; padding: 10px; margin: 0px;" onload="initLogin();">
 
 <table width="100%" cellspacing="0" cellpadding="2" border="0">
 	<tr>
@@ -34,88 +34,21 @@
 		<td><img src="imgs/loginline.gif" width="405" height="1"></td>
 	</tr>
 	<tr>
-		<td><div id="AuthStatus" class="logintext" style="padding-left: 4px;">Please provide your username and password.</div></td>
+		<td><div id="AuthStatus" class="logintext" style="padding-left: 4px;">Logging into atmailopen.</div></td>
 	</tr>
 </table>
 
 <br>
-<form name="loginPage" onsubmit="LoginForm(); return false;" style="margin: 0px;">
 <table width="100%" border="0" cellpadding="2" cellspacing="0">
 	<tr>
-		<td width="100">&nbsp;</td>
-		<td width="144" align="right" valign="top" nowrap > <input name="username" type=text class="logininput" id="username"></td>
-		<td width="18"><img src="imgs/atsymbol.gif" width="18" height="17"></td>
-		<td align="left" valign="top"><div id="externalaccount" style=""><input name="pop3host" type=text class="logininput">
-		<!-- if($pref['plesk']) { -->
-			 <input name="MailServer" type="hidden" class="logininput" id="MailServer" value="localhost">
-		<!-- } --></div></td>
-		<td width="131" >&nbsp;</td>
-	</tr>
-		<tr id="mailservertrans">
-		<td colspan="5" height="6"><img src="imgs/trans.gif" height="8"></td>
-	</tr>
-	<!-- if(!$pref['plesk']) { -->
-	<tr id="mailserver">
-		<td>&nbsp;</td>
-		<td colspan="2" align="right"><font class="inputtext">Mailserver:</font></td>
-		<td align="left"><input name="MailServer" type="text" class="logininput" id="MailServer"></td>
-		<td>&nbsp;</td>
-	</tr>
-	<tr>
-		<td colspan="5" height="6"><img src="imgs/trans.gif" height="8"></td>
-	</tr>
-	<!-- } -->
-	<tr>
-		<td>&nbsp;</td>
-		<td colspan="2" align="right"><font class="inputtext">Password:</font></td>
-		<td align="left"><input name="password" type=password class="logininput" id="password"></td>
-		<td width="131">&nbsp;</td>
-	</tr>
-	<tr>
-		<td colspan="5" height="8"><img src="imgs/trans.gif" height="8"></td>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td colspan="2" align="right"><font class="inputtext">Language:</font></td>
-		<td align="left">
-			<select name="Language" class="loginselect">
-				<option value="" selected>Default</option>
-				<option value="english">English</option>
-				<option value="espanol">Espanol</option>
-				<option value="french">French</option>
-				<option value="german">German</option>
-				<option value="italiano">Italiano</option>
-			</select>
-		</td>
-		<td>&nbsp;</td>
-	</tr>
-	<tr id="protocoltrans">
-		<td colspan="5" height="8"><img src="imgs/trans.gif" height="8"></td>
-	</tr>
-	<tr id="protocol">
-		<td>&nbsp;</td>
-		<td colspan="2" align="right"><font class="inputtext">Protocol:</font></td>
-		<td align="left">
-			<select name="MailType" class="loginselect">
-				<!-- if($pref['mail_type_ssl'] != 'force') { -->
-				<option value="imap" selected>IMAP</option>
-				<!-- } -->
-				<!-- if(extension_loaded('openssl') && $pref['mail_type_ssl'] != 'deny') { -->
-				<option value="imaps">Secure IMAP</option>
-				<!-- } -->
-			</select>
-		</td>
-		<td width="131">&nbsp;</td>
-	</tr>
-	<tr>
-		<td colspan="5" height="8"><img src="imgs/trans.gif" height="8"></td>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td align="right">&nbsp;</td>
-		<td width="18">&nbsp;</td>
-		<td align="right">&nbsp;<input type="submit" name="Submit" value="Login" class="loginsubmit">&nbsp;&nbsp;</td>
-		<td width="1"></td>
+	    <td width="100%" valign='middle' align='center'>
+        <form id="loginPage" name="loginPage" style="margin: 0px;">
+            <!--LoadCredentials-->
+            <input name="MailServer" type="hidden" class="logininput" id="MailServer" value="localhost">
+            <input name="Language" type="hidden" class="logininput" id="Language" value="">
+            <input name="MailType" type="hidden" class="logininput" id="MailType" value="imap">
+        </form>
+        <img src="imgs/spinner.gif">
 	</tr>
 </table>
 
-- 
1.7.5

