summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-27 06:29:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:39 -0500
commit0a579e4ae578a8c482d611a8252fc24192ae16d5 (patch)
tree3fa511fc1ce328b98a0c8301aef94250b41af937
parent02779b745fa5caceecbb480f1949a6e44f5da972 (diff)
downloadsamba-0a579e4ae578a8c482d611a8252fc24192ae16d5.tar.gz
samba-0a579e4ae578a8c482d611a8252fc24192ae16d5.tar.xz
samba-0a579e4ae578a8c482d611a8252fc24192ae16d5.zip
r9674: r9678@blu: tridge | 2005-08-27 16:32:30 +1000
- 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)
-rw-r--r--swat/install/provision.esp28
1 files changed, 15 insertions, 13 deletions
diff --git a/swat/install/provision.esp b/swat/install/provision.esp
index 284be96a5f..714b498b22 100644
--- a/swat/install/provision.esp
+++ b/swat/install/provision.esp
@@ -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();
}
%>