Add possibility to assign groups to newly added entries from the beginning

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-12-23 12:37:17 +01:00
parent 943a2e5161
commit fcbc8a709f
7 changed files with 69 additions and 10 deletions

View File

@@ -494,6 +494,8 @@ function deleteList() {
function addList(event) {
const type = event.data.type;
const comment = $("#new_comment").val();
// Convert all group IDs to integers
const group = $("#new_group").val().map(Number);
// Check if the user wants to add multiple domains (space or newline separated)
// If so, split the input and store it in an array
@@ -522,7 +524,7 @@ function addList(event) {
dataType: "json",
processData: false,
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ address: addresses, comment: comment, type: type }),
data: JSON.stringify({ address: addresses, comment: comment, type: type, groups: group }),
success: function (data) {
utils.enableAll();
utils.listsAlert(type + "list", addresses, data);