diff --git a/html/admin.html b/html/admin.html
index 6efbe1f..3a15429 100644
--- a/html/admin.html
+++ b/html/admin.html
@@ -582,15 +582,16 @@
{{ .quantityStrings.addUser.Singular }}
diff --git a/lang/admin/en-us.json b/lang/admin/en-us.json
index 4dd03b3..e8fe211 100644
--- a/lang/admin/en-us.json
+++ b/lang/admin/en-us.json
@@ -119,7 +119,8 @@
"accessJFASettings": "Cannot be changed as either \"Admin Only\" or \"Allow All\" has been set in Settings > General.",
"sortingBy": "Sorting By",
"filters": "Filters",
- "clickToRemoveFilter": "Click to remove this filter."
+ "clickToRemoveFilter": "Click to remove this filter.",
+ "clearSearch": "Clear search"
},
"notifications": {
"changedEmailAddress": "Changed email address of {n}.",
diff --git a/ts/modules/accounts.ts b/ts/modules/accounts.ts
index ff5b853..af352f2 100644
--- a/ts/modules/accounts.ts
+++ b/ts/modules/accounts.ts
@@ -1810,6 +1810,12 @@ export class accountsList {
};
this._search.oninput = onchange;
+ const clearSearchButton = document.getElementById("accounts-search-clear") as HTMLSpanElement;
+ clearSearchButton.addEventListener("click", () => {
+ this._search.value = "";
+ onchange();
+ });
+
this._announceTextarea.onkeyup = this.loadPreview;
addDiscord = newDiscordSearch(window.lang.strings("linkDiscord"), window.lang.strings("searchDiscordUser"), window.lang.strings("add"), (user: DiscordUser, id: string) => {
_post("/users/discord", {jf_id: id, discord_id: user.id}, (req: XMLHttpRequest) => {