luci-mod-network: disable 'Edit' button for dynamic interfaces
authorPaul Donald <newtwen@gmail.com>
Sun, 31 Dec 2023 13:11:41 +0000 (13:11 +0000)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Mar 2024 08:20:39 +0000 (09:20 +0100)
Otherwise they produce "Cannot read properties of null".

Tested on 23.05.2

Fixes issue #6799

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 032f3056789d01930028ab5eeecac59c17c7e8d6)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 79ac3c80b62ee34ce1cc72bdedddcd6cdc2b6101..d11c12d981de798dbe2ab4fe0db8f29ecd317ff3 100644 (file)
@@ -555,6 +555,11 @@ return view.extend({
                                tdEl.lastChild.childNodes[3].disabled = true;
                        }
 
+                       if (dynamic) {
+                               //disable the 'Edit' button on dynamic interfaces
+                               tdEl.lastChild.childNodes[2].disabled = true;
+                       }
+
                        return tdEl;
                };