diff options
author | Patrick Murphy <pmurphy@dotnet.multitech.net> | 2020-06-07 12:55:29 -0500 |
---|---|---|
committer | Patrick Murphy <pmurphy@dotnet.multitech.net> | 2020-06-07 12:55:29 -0500 |
commit | f46e92d458125ecb4f090f56c618bc42d3af0040 (patch) | |
tree | 9968ef7a4c4e2c295bd1eb3fa52166b0e89edf49 | |
parent | c84568b86b0a459d704c5e317b25d6f62f18fbf1 (diff) | |
parent | 8f02cf3a8a39d17b8a74c29b383a9156d8f4146a (diff) | |
download | commissioning-f46e92d458125ecb4f090f56c618bc42d3af0040.tar.gz commissioning-f46e92d458125ecb4f090f56c618bc42d3af0040.tar.bz2 commissioning-f46e92d458125ecb4f090f56c618bc42d3af0040.zip |
Merge remote-tracking branches 'origin' and 'remotes/gitlab/master'
-rw-r--r-- | www/commission/index.php | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/www/commission/index.php b/www/commission/index.php index 10e044e..fda4e97 100644 --- a/www/commission/index.php +++ b/www/commission/index.php @@ -19,6 +19,7 @@ $status = 0; $save_password = ""; $reset = ""; $userok = 0; +$formdisplay = true; // Define variables and initialize with empty values $username = $password = $save_password = ""; $username_err = $password_err = $confirm_password_err = ""; @@ -197,6 +198,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ if ($status == 0) { $finished = "Commissioning Complete"; + $formdisplay = false; $password_err = $result2; $username_err = $result; // Disable commissioning @@ -263,29 +265,30 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ </h3> </p> - - <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> - <input type="hidden" name="save_password" value="<?php echo $save_password; ?>"> - <div class="form-group <?php echo (strlen($username_err)) ? 'has-error' : ''; ?>"> - <label>Username</label> - <input type="text" name="username" class="form-control" value="<?php echo $username; ?>"> - <p> - <span class="help-block"><?php echo $username_err; ?></span> - </p> - </div> - <div class="form-group <?php echo (strlen($password_err)) ? 'has-error' : ''; ?>"> - <label><?php echo $conftxt; ?></label> - <input type="password" name="password" class="form-control" value="<?php echo $password; ?>"> - <p> - <span class="help-block"><?php echo $password_err; ?></span> - </p> - </div> - <p><label><?php echo $pwdscore; ?></label></p> - <div class="form-group"> - <input type="submit" class="btn btn-primary" value="Submit"> - <input type="submit" name = "reset" class="btn btn-default" value="Reset"> - </div> - </form> + <div id="formwrapper" <?php if ($formdisplay===false){?>style="display:none"<?php } ?>> + <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> + <input type="hidden" name="save_password" value="<?php echo $save_password; ?>"> + <div class="form-group <?php echo (strlen($username_err)) ? 'has-error' : ''; ?>"> + <label>Username</label> + <input type="text" name="username" class="form-control" value="<?php echo $username; ?>"> + <p> + <span class="help-block"><?php echo $username_err; ?></span> + </p> + </div> + <div class="form-group <?php echo (strlen($password_err)) ? 'has-error' : ''; ?>"> + <label><?php echo $conftxt; ?></label> + <input type="password" name="password" class="form-control" value="<?php echo $password; ?>"> + <p> + <span class="help-block"><?php echo $password_err; ?></span> + </p> + </div> + <p><label><?php echo $pwdscore; ?></label></p> + <div class="form-group"> + <input type="submit" class="btn btn-primary" value="Submit"> + <input type="submit" name = "reset" class="btn btn-default" value="Reset"> + </div> + </form> + </div> </div> </body> </html> |