summaryrefslogtreecommitdiffstats
path: root/webui_templates/system_edit.tmpl
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-04-01 15:00:38 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-04-01 15:00:38 -0400
commit952cdfbd85671c2ed6dfa55fa34b33739815e288 (patch)
treeaa17f412c7eda058d7d6a5e78f76c5885ecb552a /webui_templates/system_edit.tmpl
parent339e79b493b8bcf41dbf59a1931d171e04c0284d (diff)
downloadthird_party-cobbler-952cdfbd85671c2ed6dfa55fa34b33739815e288.tar.gz
third_party-cobbler-952cdfbd85671c2ed6dfa55fa34b33739815e288.tar.xz
third_party-cobbler-952cdfbd85671c2ed6dfa55fa34b33739815e288.zip
Move the authentication error messages in the WebUI to a common template file so they can be reused, in those messages, explain who is in the access control list. Also make the system "remove"
buttons for NICs change to "hide" buttons in non-editable modes.
Diffstat (limited to 'webui_templates/system_edit.tmpl')
-rw-r--r--webui_templates/system_edit.tmpl31
1 files changed, 20 insertions, 11 deletions
diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl
index 517f569..cdb1adc 100644
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -14,9 +14,11 @@
function delete_interface(num)
{
- #for $field in $fields
- document.getElementById("${field}-intf" + num).value = "";
- #end for
+ #if $editable == True
+ #for $field in $fields
+ document.getElementById("${field}-intf" + num).value = "";
+ #end for
+ #end if
toggleRowVisibility("id" + num);
}
@@ -87,10 +89,8 @@ function page_onload() {
</script>
#if $editable != True
-<blockquote>
-WARNING: It looks like you do not have permission to make changes.
-To recieve access, contact your Cobbler server administrator.
-</blockquote>
+#set global $owners = $system.owners
+#include "/usr/share/cobbler/webui_templates/enoaccess.tmpl"
#end if
<form method="post" action="$base_url?mode=system_save">
@@ -390,11 +390,20 @@ To recieve access, contact your Cobbler server administrator.
#if $interface != "intf0"
<tr class="listrow" id="child-id${counter}-8">
<td>
- <label for="enabled-$interface">Remove</label>
+ #if $editable == True
+ <label for="enabled-$interface">Remove</label>
+ #else
+ <label for="enabled-$interface">Hide</label>
+ #end if
</td>
<td>
- <input type="button" name="delete-$interface" value="remove" onclick="delete_interface($counter)">
- <p class="context-tip">Clicking this button removes the interface from the configuration.</p>
+ #if $editable == True
+ <input type="button" name="delete-$interface" value="remove" onclick="delete_interface($counter)">
+ <p class="context-tip">Clicking this button removes the interface from the configuration.</p>
+ #else
+ <input type="button" name="delete-$interface" value="hide" onclick="delete_interface($counter)">
+
+ #end if
</td>
</tr>
#end if
@@ -416,7 +425,7 @@ To recieve access, contact your Cobbler server administrator.
</td>
</tr>
- #if $system
+ #if $system and $editable == True
<tr id="id10001">
<td>
<label for="delete">Delete</label>