diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-12-18 10:23:24 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-12-18 10:23:24 -0500 |
commit | 13ea0a8fcc2b8a12b410372d7861fa2f5d825801 (patch) | |
tree | 7bfd631a9d1ea2693e298795d8d206cdafd96413 | |
parent | 8e1b4b1ab5ed6aabbbec2d984f4979474b5ddb90 (diff) | |
download | third_party-cobbler-13ea0a8fcc2b8a12b410372d7861fa2f5d825801.tar.gz third_party-cobbler-13ea0a8fcc2b8a12b410372d7861fa2f5d825801.tar.xz third_party-cobbler-13ea0a8fcc2b8a12b410372d7861fa2f5d825801.zip |
Apply Tim's patch to fix/re-enable the random MAC feature.
-rw-r--r-- | cobbler/webui/CobblerWeb.py | 2 | ||||
-rw-r--r-- | webui_templates/system_edit.tmpl | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py index d17ea8f..a3cee6b 100644 --- a/cobbler/webui/CobblerWeb.py +++ b/cobbler/webui/CobblerWeb.py @@ -685,7 +685,7 @@ class CobblerWeb(object): 'message2' : "Cobbler config has been applied to filesystem." }) - def random_mac(self): + def random_mac(self, **spam): if not self.__xmlrpc_setup(): return self.xmlrpc_auth_failure() mac = self.remote.get_random_mac() diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl index fa37244..e785e05 100644 --- a/webui_templates/system_edit.tmpl +++ b/webui_templates/system_edit.tmpl @@ -29,7 +29,7 @@ function disablename(value) } } #else -function get_random_mac() +function get_random_mac(field) { xmlHttp = new XMLHttpRequest(); xmlHttp.open("GET", "$base_url?mode=random_mac", true); @@ -38,7 +38,7 @@ function get_random_mac() var mac_field = document.getElementById("macaddress") var result = xmlHttp.responseText; if (result.charAt(2) == ':' && result.charAt(5) == ':') { - mac_field.value = result; + document.getElementById(field).value = result; } } }; @@ -277,9 +277,7 @@ function page_onload() { value="$macaddress" /> - ## #if not $system - ## <a href="javascript: get_random_mac()" style="font-size: 0.8em;">random</a> - ## #end if + <a href="javascript: get_random_mac('macaddress-$interface')" style="font-size: 0.8em;">Random MAC</a> <p class="context-tip">Example: AA:BB:CC:DD:EE:FF</p> </td> |