jlyons: branch asterisknow r253 - /branches/asterisknow/config/setup/10.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri Jan 12 18:30:48 MST 2007


Author: jlyons
Date: Fri Jan 12 19:30:48 2007
New Revision: 253

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=253
Log:
Add registartion stuff

Modified:
    branches/asterisknow/config/setup/10.html

Modified: branches/asterisknow/config/setup/10.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/10.html?view=diff&rev=253&r1=252&r2=253
==============================================================================
--- branches/asterisknow/config/setup/10.html (original)
+++ branches/asterisknow/config/setup/10.html Fri Jan 12 19:30:48 2007
@@ -4,6 +4,7 @@
 	<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
 </HEAD>
 <script src="../scripts/prototype.js"></script>
+<script src="../scripts/astman.js"></script>
 <SCRIPT LANGUAGE="JavaScript">
 <!--
 var rawman_url;
@@ -12,10 +13,10 @@
 var widgets = new Array;
 
 function localinit(){
-	//parent.$('next').disabled = true;
+	parent.$('next').disabled = true;
 	parent.$('next').onclick = function(){	 parent.window.location.href ="../cfgbasic.html"; };
 	parent.$('back').disabled = false;
-	parent.$('back').onclick  = function(){	 window.location.href="7.html"; };
+	parent.$('back').onclick  = function(){	 	parent.$('next').disabled = false; window.location.href="7.html"; };
 	rawman_url = parent.rawman_url ;
 	parent.astmanEngine.setURL(rawman_url);
 	ping();
@@ -39,8 +40,35 @@
 
 			if ( originalRequest.responseText.match("Pong") ) {
 					// load default numbnerplan settings
-				parent.astmanEngine.pollEvents();
+					parent.astmanEngine.pollEvents();
+					if(window.location.href.match("registered") ){
+						parent.$('next').disabled = false; 
+						$('registration').style.display='none';
+						$('usermessage').innerHTML = "You have been registered succesfully !! ";
+					}else{
+						$('registration').style.display='';
+					}
 			}
+}
+// submit to  using POST
+
+
+
+function post_userdetails(){
+
+	var requiredfields = [ 'first_name', 'last_name', 'email', 'phone', 'country' ];
+	for(var i=0; i < requiredfields.length ; i++ ){
+		if ( $(requiredfields[i]).value == "" ){
+			alert( " Please enter your " + requiredfields[i] );
+			$(requiredfields[i]).focus();
+			return false;
+		}
+	}
+
+	$('retURL').value = window.location.href + "?registered" ;
+	document.getElementById("form1").submit();
+	$('registration').style.display='none';
+	$('status_message').style.display= "";
 }
 
 //-->
@@ -69,12 +97,125 @@
 			
 				<div class="heading"> Finish</div>
 				<div class="subheading">
-				Congratulations You have sucessfully configured your Asterisk installation<BR>
-				Click Next to proceed to the User Interface</div>
+				Congratulations You have sucessfully configured your Asterisk installation<BR></div>
+<form id="form1" action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
+<div id="registration" STYLE="display:none; position: absolute; left: 180; top: 80; width:600; height:300;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
+	<table width="100%" cellpadding=0 cellspacing=0>
+		<TR bgcolor="#7E5538" >
+				<TD  onmousedown="startDrag(event , 'registration');" id="registration_title" style="cursor: move;color:#FFFFFF; font-size: 12px; font-weight:bold;" align="center">Register AsteriskNOW with Digium</TD>
+				<TD Height="20" width=15 align="center"  style="color:#FFFFFF; font-size: 12px; font-weight:bold;" onclick="$('cancel').click();">X</TD>
+		</TR>
+	</table>
+<TABLE width=590 cellpadding=1 cellspacing=2 border=0>
+<TR><TD height=10 colspan=4></TD></TR>
+<TR>
+	<TD>First Name <font color=red>*</font></TD>
+	<TD><input  maxlength="40" type="text" id="first_name" size="16" name="first_name"></TD>
+	<TD>Last Name <font color=red>*</font></TD>
+	<TD><input  maxlength="40" type="text" id="last_name" size="16" name="last_name"></TD>
+</TR>
+<TR>
+	<TD>Title</TD>
+	<TD><input  maxlength="80" type="text" id="title" size="16" name="title"></TD>
+	<TD>Company</TD>
+	<TD><input  maxlength="80" type="text" id="company" size="16" name="company"></TD>
+</TR>
+
+<TR>
+	<TD>Industry</TD>
+	<TD><select  id="industry" name="industry">
+			<option value="">--None--</option>
+			<option value="Agriculture">Agriculture</option>
+			<option value="Apparel">Apparel</option>
+			<option value="Banking">Banking</option>
+			<option value="Biotechnology">Biotechnology</option>
+			<option value="Chemicals">Chemicals</option>
+			<option value="Communications">Communications</option>
+			<option value="Construction">Construction</option>
+			<option value="Consulting">Consulting</option>
+			<option value="Education">Education</option>
+			<option value="Electronics">Electronics</option>
+			<option value="Energy">Energy</option>
+			<option value="Engineering">Engineering</option>
+			<option value="Entertainment">Entertainment</option>
+			<option value="Environmental">Environmental</option>
+			<option value="Finance">Finance</option>
+			<option value="Food & Beverage">Food & Beverage</option>
+			<option value="Government">Government</option>
+			<option value="Healthcare">Healthcare</option>
+			<option value="Hospitality">Hospitality</option>
+			<option value="Insurance">Insurance</option>
+			<option value="Machinery">Machinery</option>
+			<option value="Manufacturing">Manufacturing</option>
+			<option value="Media">Media</option>
+			<option value="Not For Profit">Not For Profit</option>
+			<option value="Other">Other</option>
+			<option value="Recreation">Recreation</option>
+			<option value="Retail">Retail</option>
+			<option value="Shipping">Shipping</option>
+			<option value="Technology">Technology</option>
+			<option value="Telecommunications">Telecommunications</option>
+			<option value="Transportation">Transportation</option>
+			<option value="Utilities">Utilities</option>
+			</select>
+			</TD>
+	<TD>Website</TD>
+	<TD><input  maxlength="80" type="text" id="URL" size="20" name="URL"></TD>
+</TR>
+<TR>
+	<TD>Email <font color=red>*</font></TD>
+	<TD><input  maxlength="80" type="text" id="email" size="16" name="email"></TD>
+	<TD>Phone <font color=red>*</font></TD>
+	<TD><input  maxlength="40" type="text" id="phone" size="14" name="phone"></TD>
+</TR>
+<TR>
+	<TD valign=top>Address</TD>
+	<TD><textarea name="street"></textarea></TD>
+	<TD valign=top>City</TD>
+	<TD valign=top><input  maxlength="40" type="text" id="city" size="14" name="city"></TD>
+</TR>
+<TR>
+	<TD>State/Province</TD>
+	<TD><input  maxlength="20" type="text" id="state" size="14" name="state"></TD>
+	<TD>Zip</TD>
+	<TD><input  maxlength="20" type="text" id="zip" size="6" name="zip"></TD>
+</TR>
+<TR>
+	<TD>Country <font color=red>*</font></TD>
+	<TD><input  maxlength="40" type="text" id="country" size="14" name="country" value="US"></TD>
+	<TD></TD>
+	<TD></TD>
+</TR>
+<TR><TD height=10 colspan=4></TD></TR>
+<TR>
+	<TD colspan=4 align="center">
+		<input type=hidden name="oid" id="oid" value="00D300000006mPe">
+		<input type=hidden name="retURL" id="retURL" value="">
+		<input type="hidden" id="recordType" name="recordType" value="012300000004zos">
+		<input type="hidden" id="lead_source" name="lead_source" value="AsteriskNOW_leadID"> 
+		<input type="button" value="Skip" onclick="parent.$('next').disabled = false; $('registration').style.display='none';">
+		&nbsp;&nbsp;
+		<input type="button" value="Register AsteriskNOW with Digium" onclick="post_userdetails()">
+	</TD>
+</TR>
+</TABLE>
+</div>
+</form>
+			<BR><BR><BR><DIV id="usermessage"></div>
+
+
+		<div ID="status_message"  STYLE="display:none; position: absolute; left: 170; top: 190; width:350; height:115;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;">
+			<BR><BR>
+			<TABLE border=0 cellpadding=0 cellspacing=3 align="center">
+			<TR><TD><img src="../images/loading.gif"></TD>
+			<TD valign="middle" align="center">&nbsp;&nbsp;<div id="message_text">Please wait ... </div></TD>
+			</TR>
+			</TABLE>
+		</div>
 
 			<!--  this page -->
 			</td>
 		</tr>
 </table>
 </BODY>
-</HTML>
+</HTML>



More information about the asterisk-gui-commits mailing list