Compare commits
2 Commits
a65fd5ddb2
...
237b5686e4
Author | SHA1 | Date | |
---|---|---|---|
237b5686e4 | |||
8586090732 |
@ -35,7 +35,7 @@
|
||||
"ncp": "^2.0.0",
|
||||
"passport": "^0.7.0",
|
||||
"passport-discord": "^0.1.4",
|
||||
"preline": "^2.7.0",
|
||||
"preline": "^3.0.0",
|
||||
"sqlite3": "^5.1.7",
|
||||
"tsconfig-paths": "^4.2.0"
|
||||
},
|
||||
|
@ -213,15 +213,15 @@ $("input[name='filterType']").on("change", () => {
|
||||
const openFilterForm = async id => {
|
||||
$("#filterForm").removeClass("submitted");
|
||||
|
||||
HSSelect.getInstance("#formAlgorithm", true).element.setValue([]);
|
||||
const formAlgorithmSelect = HSSelect.getInstance("#formAlgorithm");
|
||||
formAlgorithmSelect.setValue("");
|
||||
|
||||
if (id === -1) {
|
||||
$("#formName").val("");
|
||||
$("#formMatch").val("");
|
||||
$("#formWhitelist").prop("checked", false);
|
||||
$("#formInsensitive").prop("checked", false);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
const data = await $.ajax({
|
||||
url: `/guild/${guildId}/filters/api?id=${id}`,
|
||||
method: "get"
|
||||
@ -231,8 +231,7 @@ const openFilterForm = async id => {
|
||||
$("#formMatch").val(data.match);
|
||||
$("#formWhitelist").prop("checked", data.is_whitelist);
|
||||
$("#formInsensitive").prop("checked", data.is_insensitive);
|
||||
|
||||
HSSelect.getInstance("#formAlgorithm").setValue(data.algorithm);
|
||||
formAlgorithmSelect.setValue(data.algorithm);
|
||||
}
|
||||
|
||||
HSOverlay.open($("#filterModal").get(0));
|
||||
|
@ -241,7 +241,7 @@
|
||||
<label for="formMatch" class="text-input-label">Match</label>
|
||||
<input type="text" id="formMatch" name="match" class="form-input text-input peer group-[.submitted]:invalid:border-red-500 group-[.submitted]:invalid:ring-red-500" required>
|
||||
<p class="text-input-help block group-[.submitted]:peer-[:invalid]:hidden">
|
||||
The
|
||||
The statement to match against.
|
||||
</p>
|
||||
<p class="mt-2 text-sm text-red-500 hidden group-[.submitted]:peer-[:invalid]:block">
|
||||
Please enter a match.
|
||||
|
Loading…
x
Reference in New Issue
Block a user