mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 10:48:26 +00:00
Add possibility to assign groups to newly added entries from the beginning
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user