mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Add Confirm on Name Change
This commit is contained in:
parent
2ee7fd7743
commit
090b030002
1 changed files with 8 additions and 1 deletions
|
@ -35,7 +35,14 @@ async function update() {
|
|||
if (editTypes[subsystem][entity].idType == 'Number') {
|
||||
res = await apiCall(`${subsystem}.${entity}.update`, {index: id as number - 0, thing: vm});
|
||||
} else {
|
||||
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
|
||||
if (id != vm.name) {
|
||||
if (confirm('You are about to Change the name and all references, are you Sure?')) {
|
||||
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
|
||||
}
|
||||
|
||||
} else {
|
||||
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
|
||||
}
|
||||
}
|
||||
|
||||
if (res.Error === null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue