]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - src/Utils.js
vlan edit: Fix automatic field disabling
[proxmox-widget-toolkit.git] / src / Utils.js
index 7710e39d084f78237ef344af618dc277084a687c..af5f1db27279198b45324662d7339b9bea15edfb 100644 (file)
@@ -777,11 +777,11 @@ utilities: {
        }
        // try to normalize - and _ separators, to support asciidoc and sphinx
        // references at the same time.
-       let section_minus_normalized = section.replace(/_/, '-');
+       let section_minus_normalized = section.replace(/_/g, '-');
        if (helpMap[section_minus_normalized]) {
            return helpMap[section_minus_normalized];
        }
-       let section_underscore_normalized = section.replace(/-/, '_');
+       let section_underscore_normalized = section.replace(/-/g, '_');
        return helpMap[section_underscore_normalized];
     },
 
@@ -854,7 +854,7 @@ utilities: {
        me.HostPort_match = new RegExp("^(" + IPV4_REGEXP + "|" + DnsName_REGEXP + ")(?::(\\d+))?$");
        me.HostPortBrackets_match = new RegExp("^\\[(" + IPV6_REGEXP + "|" + IPV4_REGEXP + "|" + DnsName_REGEXP + ")\\](?::(\\d+))?$");
        me.IP6_dotnotation_match = new RegExp("^(" + IPV6_REGEXP + ")(?:\\.(\\d+))?$");
-       me.Vlan_match = /^vlan(\\d+)/;
-       me.VlanInterface_match = /(\\w+)\\.(\\d+)/;
+       me.Vlan_match = /^vlan(\d+)/;
+       me.VlanInterface_match = /(\w+)\.(\d+)/;
     },
 });