Skip to content

Commit

Permalink
Merge pull request #22 from Wutze/devel
Browse files Browse the repository at this point in the history
Button enables/disables if user already exists or not
  • Loading branch information
Wutze authored Oct 15, 2020
2 parents 843b8e4 + 48d6c8a commit 43cd95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wwwroot/include/html/modules/admin/admin-add.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @copyright 2020 OpenVPN-WebAdmin
* @link https://github.com/Wutze/OpenVPN-WebAdmin
* @see Internal Documentation ~/doc/
* @version 1.4.0
* @version 1.4.1
* @todo new issues report here please https://github.com/Wutze/OpenVPN-WebAdmin/issues
*/

Expand Down Expand Up @@ -54,7 +54,7 @@
</div>
<!-- /.card-body -->
<div class="card-footer">
<button type="submit" class="btn btn-primary" name="op" value="adduser"><?php echo GET_Lang::nachricht('_USERDATA_SAVE'); ?></button>
<button type="submit" class="btn btn-primary" name="op" value="adduser" id="Plonk"><?php echo GET_Lang::nachricht('_USERDATA_SAVE'); ?></button>
</div>
</div>
<!-- /.card -->
Expand Down
4 changes: 3 additions & 1 deletion wwwroot/js/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @copyright 2020 OpenVPN-WebAdmin
* @link https://github.com/Wutze/OpenVPN-WebAdmin
* @see Internal Documentation ~/doc/
* @version 1.0.0
* @version 1.4.1
* @todo new issues report here please https://github.com/Wutze/OpenVPN-WebAdmin/issues
*/

Expand All @@ -39,8 +39,10 @@ function showuser(str) {
var isok = JSON.parse(this.responseText);
if (isok['isuser']){
document.getElementById("InputUsername").style.backgroundColor = "#ea7782"; // username not found
document.getElementById("Plonk").disabled = true;
}else{
document.getElementById("InputUsername").style.backgroundColor = "#90f7a7"; // username found
document.getElementById("Plonk").disabled = false;
}
}
};
Expand Down

0 comments on commit 43cd95f

Please sign in to comment.