Removed datapoint rename confirmation since everything is automatic

This commit is contained in:
Magnus Åhall 2024-07-25 10:59:03 +02:00
parent 7cf2b60803
commit 8fa8bb4c3a
2 changed files with 1 additions and 7 deletions

View File

@ -17,10 +17,4 @@ export class UI {
break break
} }
} }
check_rename() {
let newName = document.querySelector(`input[name="name"]`).value
if (newName != this.datapoint.Name)
return confirm(`Trigger expressions needs to be manually updated when renaming a datapoint.\nDo you want to rename the datapoint?`)
return true
}
} }

View File

@ -8,7 +8,7 @@
{{ block "page_label" . }}{{end}} {{ block "page_label" . }}{{end}}
<form id="form-trigger" action="/datapoint/update/{{ .Data.Datapoint.ID }}" method="post" onsubmit="return _ui.check_rename()"> <form id="form-trigger" action="/datapoint/update/{{ .Data.Datapoint.ID }}" method="post">
<div id="widgets" class="widgets"> <div id="widgets" class="widgets">
<div class="label">Group</div> <div class="label">Group</div>
<div><input type="text" name="group" value="{{ .Data.Datapoint.Group }}"></div> <div><input type="text" name="group" value="{{ .Data.Datapoint.Group }}"></div>