r9674: r9678@blu: tridge | 2005-08-27 16:32:30 +1000
authorAndrew Tridgell <tridge@samba.org>
Sat, 27 Aug 2005 06:29:12 +0000 (06:29 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:39 +0000 (13:34 -0500)
 - removed the initial provision button. It is just way too confusing.
 We should have a separate 'migration' page instead, but in the
 meantime to migrate please use the command line

 - added a check for a blank password. If blank, then ask them
  to reenter it
(This used to be commit 2673bebf138a9bda79f99dd5caff93dd6db24658)

swat/install/provision.esp

index 284be96a5f3b7bad91fada3a37946a936cef43cc..714b498b22f9f4d3a592c733ab441bd5837bd51b 100644 (file)
@@ -8,7 +8,7 @@
 <h1>Samba4 provisioning</h1>
 
 <%
-var f = FormObj("Provisioning", 0, 3);
+var f = FormObj("Provisioning", 0, 2);
 var i;
 var lp = loadparm_init();
 
@@ -31,15 +31,14 @@ f.add("HOSTGUID", "Host GUID");
 f.add("BASEDN", "Base DN");
 f.add("HOSTIP", "Host IP");
 f.add("DEFAULTSITE", "Default Site");
-f.submit[0] = "Initial provision";
-f.submit[1] = "Provision";
-f.submit[2] = "Cancel";
+f.submit[0] = "Provision";
+f.submit[1] = "Cancel";
 
 if (form['submit'] == "Cancel") {
        redirect("/");
 }
 
-if ((form['submit'] == "Provision") || (form['submit'] == "Initial provision")) {
+if (form['submit'] == "Provision") {
        for (r in form) {
                subobj[r] = form[r];
        }
@@ -49,17 +48,20 @@ for (i=0;i<f.element.length;i++) {
        f.element[i].value = subobj[f.element[i].name];
 }
 
-lp.set("realm", subobj.REALM);
+if (form['submit'] == "Provision") {
+       lp.set("realm", subobj.REALM);
+       var goodpass = (subobj.CONFIRM == subobj.ADMINPASS);
 
-var goodpass = (subobj.CONFIRM == subobj.ADMINPASS);
-if (form['submit'] == "Provision" && goodpass) {
-       provision(subobj, writefln, true);
-} else if (form['submit'] == "Initial provision" && goodpass) {
-       provision(subobj, writefln, false);
-} else {
-       if (!goodpass && form['submit'] != undefined) {
+       if (!goodpass) {
                write("<h3>Passwords don't match.  Please try again.</h3>");
+               f.display();
+       } else if (subobj.ADMINPASS == "") {
+               write("<h3>You must choose an administrator password.  Please try again.</h3>");
+               f.display();
+       } else {
+               provision(subobj, writefln, false);
        }
+} else {
        f.display();
 }
 %>