svn commit: samba r7094 - in branches/SAMBA_4_0/swat/esptest: .

tridge at samba.org tridge at samba.org
Mon May 30 08:23:37 GMT 2005


Author: tridge
Date: 2005-05-30 08:23:37 +0000 (Mon, 30 May 2005)
New Revision: 7094

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7094

Log:
use the Form() object in a few more places

Modified:
   branches/SAMBA_4_0/swat/esptest/exception.esp
   branches/SAMBA_4_0/swat/esptest/formtest.esp
   branches/SAMBA_4_0/swat/esptest/session.esp


Changeset:
Modified: branches/SAMBA_4_0/swat/esptest/exception.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/exception.esp	2005-05-30 08:13:34 UTC (rev 7093)
+++ branches/SAMBA_4_0/swat/esptest/exception.esp	2005-05-30 08:23:37 UTC (rev 7094)
@@ -2,12 +2,14 @@
 
 <h1>Samba4 exception test</h1>
 
-<form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']"> 
-    <input name="submit" type="submit" value="Generate Exception">
-    <input name="submit" type="submit" value="No Exception">
-</form>
 
 <%
+var f = Form("ExceptionTest", 0, 2);
+f.submit[0] = "Generate Exception";
+f.submit[1] = "No Exception";
+
+display_form(f);
+
 if (request['REQUEST_METHOD'] == "POST") {
 	function TestFunction(arg1, arg2) {
 		 return "OK";

Modified: branches/SAMBA_4_0/swat/esptest/formtest.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/formtest.esp	2005-05-30 08:13:34 UTC (rev 7093)
+++ branches/SAMBA_4_0/swat/esptest/formtest.esp	2005-05-30 08:23:37 UTC (rev 7094)
@@ -15,7 +15,7 @@
   /* if its a post then the user has filled in the form, so
      report the values 
   */
-  if (form['OK']) {
+  if (form['submit'] == "OK") {
 %>
   You chose firstName=@@form['firstName'] lastName=@@form['lastName']<p>
   

Modified: branches/SAMBA_4_0/swat/esptest/session.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/session.esp	2005-05-30 08:13:34 UTC (rev 7093)
+++ branches/SAMBA_4_0/swat/esptest/session.esp	2005-05-30 08:23:37 UTC (rev 7094)
@@ -2,17 +2,18 @@
 
 <h1>Samba4 session test</h1>
 
-<form name="SessionTest" method="POST" action="@@request['SCRIPT_NAME']"> 
-    Name:   <input name="Name"  type="text" value=""><br>
-    Value:  <input name="Value" type="text" value=""><br>
-    Timeout: <input name="Timeout" type="text" value=""><br>
-    <input name="submit" type="submit" value="Append">
-    <input name="submit" type="submit" value="Reset">
-    <input name="submit" type="submit" value="Destroy">
-    <input name="submit" type="submit" value="Cancel"><br>
-</form>
+<%
+var f = Form("SessionTest", 3, 4);
+f.element[0].label = "Name";
+f.element[1].label = "Value";
+f.element[2].label = "Timeout";
+f.submit[0] = "Append";
+f.submit[1] = "Reset";
+f.submit[2] = "Destroy";
+f.submit[3] = "Cancel";
 
-<%
+display_form(f);
+
   /* if its a post then the user has filled in the form, so
      report the values 
   */



More information about the samba-cvs mailing list