diff options
-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> |