summaryrefslogtreecommitdiffstats
path: root/webui_templates
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-12-18 10:23:24 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-12-18 10:23:24 -0500
commit13ea0a8fcc2b8a12b410372d7861fa2f5d825801 (patch)
tree7bfd631a9d1ea2693e298795d8d206cdafd96413 /webui_templates
parent8e1b4b1ab5ed6aabbbec2d984f4979474b5ddb90 (diff)
downloadthird_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.
Diffstat (limited to 'webui_templates')
-rw-r--r--webui_templates/system_edit.tmpl8
1 files changed, 3 insertions, 5 deletions
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>