diff --git a/pages/managers.php b/pages/managers.php index f828c72..9b428fa 100644 --- a/pages/managers.php +++ b/pages/managers.php @@ -16,13 +16,24 @@ if ($VARS['man'] && $database->has('accounts', ['username' => $VARS['man']])) { } ?> -
+ + +

- " /> +
+
+ id="manager-box" class="form-control" value="" name="manager" placeholder="" /> +
+
+ + + +
+
has('accounts', ['username' => $VARS['man']])) { - - \ No newline at end of file + + \ No newline at end of file diff --git a/static/js/managers.js b/static/js/managers.js index 94bd3d2..99db6a3 100644 --- a/static/js/managers.js +++ b/static/js/managers.js @@ -62,6 +62,16 @@ var manoptions = { $("#manager-box").easyAutocomplete(manoptions); +$("#manager-box").keyup(function (e) { + if (e.keyCode == 13) { + $("#selectmanagerbtn").click(); + } +}); + +$("#selectmanagerbtn").click(function () { + document.location.href = "app.php?page=managers&man=" + $("#manager-box").val(); +}); + $("#people-box").keyup(function (event) { if (event.keyCode == 13) { $("#addpersonbtn").click();