Compare commits

..

No commits in common. "main" and "v41" have entirely different histories.
main ... v41

2 changed files with 7 additions and 1 deletions

View file

@ -17,4 +17,10 @@ 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"> <form id="form-trigger" action="/datapoint/update/{{ .Data.Datapoint.ID }}" method="post" onsubmit="return _ui.check_rename()">
<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>