From 6da196ee8ea2f5a461fd6e1574437b857ad4fb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=B6hn?= Date: Sun, 28 May 2023 17:36:28 +0200 Subject: [PATCH 1/3] add minus as allowed char of widget uid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Höhn --- .../web/src/pages/developer/widgets/widget-edit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue index fc7af05273..30d34580fe 100644 --- a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue @@ -253,7 +253,7 @@ export default { this.$f7.dialog.alert('Please give an UID to the widget') return } else if (!/^[A-Za-z0-9_]+$/.test(this.widget.uid)) { - this.$f7.dialog.alert('Widget UID is only allowed to contain A-Z,a-z,0-9,_') + this.$f7.dialog.alert('Widget UID is only allowed to contain A-Z,a-z,0-9,_-') return } // if (!this.widget.config.label) { From d8401b1ffb3da613bd1475c2d1bd4997d6654f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=B6hn?= Date: Sun, 28 May 2023 22:02:36 +0200 Subject: [PATCH 2/3] fix in regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Höhn --- .../web/src/pages/developer/widgets/widget-edit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue index 30d34580fe..c00804f493 100644 --- a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue @@ -252,7 +252,7 @@ export default { if (!this.widget.uid) { this.$f7.dialog.alert('Please give an UID to the widget') return - } else if (!/^[A-Za-z0-9_]+$/.test(this.widget.uid)) { + } else if (!/^[A-Za-z0-9_-]+$/.test(this.widget.uid)) { this.$f7.dialog.alert('Widget UID is only allowed to contain A-Z,a-z,0-9,_-') return } From 1b2b679f525a9ffc34b2eb48bdb05d592a358f23 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Mon, 29 May 2023 13:41:50 +0200 Subject: [PATCH 3/3] Update bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue Signed-off-by: Florian Hotze --- .../web/src/pages/developer/widgets/widget-edit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue index c00804f493..61dcb853df 100644 --- a/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/developer/widgets/widget-edit.vue @@ -253,7 +253,7 @@ export default { this.$f7.dialog.alert('Please give an UID to the widget') return } else if (!/^[A-Za-z0-9_-]+$/.test(this.widget.uid)) { - this.$f7.dialog.alert('Widget UID is only allowed to contain A-Z,a-z,0-9,_-') + this.$f7.dialog.alert('Widget UID is only allowed to contain A-Z,a-z,0-9,_,-') return } // if (!this.widget.config.label) {