summaryrefslogtreecommitdiffstats
path: root/webui_templates
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-18 15:00:07 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-18 15:00:07 -0400
commit2127d90388fbe29d6b5d0446bd971acaf5051e55 (patch)
tree4791123585b9b51a52b0ff9a72d1b5fdbe472a94 /webui_templates
parent6fc3f8e8496610eeddc950a04417323b951d6547 (diff)
downloadthird_party-cobbler-2127d90388fbe29d6b5d0446bd971acaf5051e55.tar.gz
third_party-cobbler-2127d90388fbe29d6b5d0446bd971acaf5051e55.tar.xz
third_party-cobbler-2127d90388fbe29d6b5d0446bd971acaf5051e55.zip
Adding rename and copy support to the Web UI.
Diffstat (limited to 'webui_templates')
-rw-r--r--webui_templates/distro_edit.tmpl28
-rw-r--r--webui_templates/profile_edit.tmpl28
-rw-r--r--webui_templates/repo_edit.tmpl28
-rw-r--r--webui_templates/system_edit.tmpl27
4 files changed, 108 insertions, 3 deletions
diff --git a/webui_templates/distro_edit.tmpl b/webui_templates/distro_edit.tmpl
index 8b2b9c7..bd76bfe 100644
--- a/webui_templates/distro_edit.tmpl
+++ b/webui_templates/distro_edit.tmpl
@@ -1,25 +1,51 @@
#extends cobbler.webui.master
-
#block body
+
+#if $distro
+<script language="javascript">
+function disablename(value)
+{
+ document.getElementById("name").disabled=value;
+ if (value) {
+ document.getElementById("name").value = "$distro.name";
+ }
+}
+</script>
+#end if
+
<form method="post" action="$base_url/distro_save">
<fieldset id="cform">
#if $distro
<legend>Editing Distro</legend>
<input type="hidden" name="new_or_edit" value="edit"/>
+ <input type="hidden" name="oldname" value="$distro.name"/>
#else
<legend>Adding a Distro</legend>
<input type="hidden" name="new_or_edit" value="new"/>
#end if
<label for="name">Name</label>
+ #if $distro
+ <input type="text" size="32" style="width: 150px;" name="name" id="name" disabled="true"
+ #else
<input type="text" size="32" style="width: 150px;" name="name" id="name"
+ #end if
#if $distro
value="$distro.name"
#end if
/>
<br/>
+ #if $distro
+ <label for="mode">Edit Mode</label>
+ <input type="radio" name="editmode" value="edit" checked onclick="javascript:disablename(true)">Edit
+ <input type="radio" name="editmode" value="rename" onclick="javascript:disablename(false)">Rename + Edit
+ <input type="radio" name="editmode" value="copy" onclick="javascript:disablename(false)">Copy + Edit
+ <br/>
+ #end if
+
+
<label for="kernel">Kernel</label>
<input type="text" size="32" style="width: 150px;" name="kernel" id="kernel"
#if $distro
diff --git a/webui_templates/profile_edit.tmpl b/webui_templates/profile_edit.tmpl
index 1fc3df8..5c46d6b 100644
--- a/webui_templates/profile_edit.tmpl
+++ b/webui_templates/profile_edit.tmpl
@@ -1,6 +1,18 @@
#extends cobbler.webui.master
-
#block body
+
+#if $profile
+<script language="javascript">
+function disablename(value)
+{
+ document.getElementById("name").disabled=value;
+ if (value) {
+ document.getElementById("name").value = "$profile.name";
+ }
+}
+</script>
+#end if
+
<form method="post" action="$base_url/profile_save">
<fieldset id="cform">
@@ -13,6 +25,7 @@
#if $profile
<legend>Editing Profile</legend>
<input type="hidden" name="new_or_edit" value="edit"/>
+ <input type="hidden" name="oldname" value="$profile.name"/>
#else
<legend>Adding a Profile</legend>
<input type="hidden" name="new_or_edit" value="new"/>
@@ -20,13 +33,26 @@
<label for="name">Profile Name</label>
+ #if $profile
+ <input type="text" size="32" style="width: 150px;" name="name" id="name" disabled="true"
+ #else
<input type="text" size="32" style="width: 150px;" name="name" id="name"
+ #end if
#if $profile
value="$profile.name"
#end if
/>
<br/>
+ #if $profile
+ <label for="mode">Edit Mode</label>
+ <input type="radio" name="editmode" value="edit" checked onclick="javascript:disablename(true)">Edit
+ <input type="radio" name="editmode" value="rename" onclick="javascript:disablename(false)">Rename + Edit
+ <input type="radio" name="editmode" value="copy" onclick="javascript:disablename(false)">Copy + Edit
+ <br/>
+ #end if
+
+
<label for="distro">Distribution</label>
<select name="distro" id="distro">
#for $distro in $distros:
diff --git a/webui_templates/repo_edit.tmpl b/webui_templates/repo_edit.tmpl
index 5783f37..f658239 100644
--- a/webui_templates/repo_edit.tmpl
+++ b/webui_templates/repo_edit.tmpl
@@ -1,26 +1,52 @@
#extends cobbler.webui.master
-
#block body
+#if $repo
+<script language="javascript">
+function disablename(value)
+{
+ document.getElementById("name").disabled=value;
+ if (value) {
+ document.getElementById("name").value = "$repo.name";
+ }
+}
+</script>
+#end if
+
+
<form method="post" action="$base_url/repo_save">
<fieldset id="cform">
#if $repo
<legend>Editing Repo</legend>
<input type="hidden" name="new_or_edit" value="edit"/>
+ <input type="hidden" name="oldname" value="$repo.name"/>
#else
<legend>Adding a Repo</legend>
<input type="hidden" name="new_or_edit" value="new"/>
#end if
<label for="name">Name</label>
+ #if $repo
+ <input type="text" size="32" style="width: 150px;" name="name" id="name" disabled="true"
+ #else
<input type="text" size="32" style="width: 150px;" name="name" id="name"
+ #end if
#if $repo
value="$repo.name"
#end if
/>
<br/>
+ #if $repo
+ <label for="mode">Edit Mode</label>
+ <input type="radio" name="editmode" value="edit" checked onclick="javascript:disablename(true)">Edit
+ <input type="radio" name="editmode" value="rename" onclick="javascript:disablename(false)">Rename + Edit
+ <input type="radio" name="editmode" value="copy" onclick="javascript:disablename(false)">Copy + Edit
+ <br/>
+ #end if
+
+
<label for="mirror">Mirror Location (http/ftp/rsync)</label>
<input type="text" size="32" style="width: 150px;" name="mirror" id="mirror"
#if $repo
diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl
index dfbb34c..7d613e6 100644
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -1,11 +1,26 @@
#extends cobbler.webui.master
+
#block body
+
+#if $system
+<script language="javascript">
+function disablename(value)
+{
+ document.getElementById("name").disabled=value;
+ if (value) {
+ document.getElementById("name").value = "$system.name";
+ }
+}
+</script>
+#end if
+
<form method="post" action="$base_url/system_save">
<fieldset id="cform">
#if $system
<input type="hidden" name="new_or_edit" value="edit"/>
+ <input type="hidden" name="oldname" value="$system.name"/>
#else
<input type="hidden" name="new_or_edit" value="new"/>
#end if
@@ -13,13 +28,25 @@
<legend>Edit a System</legend>
<label for="name">System Name</label>
+ #if $system
+ <input type="text" size="32" style="width: 150px;" name="name" id="name" disabled="true"
+ #else
<input type="text" size="32" style="width: 150px;" name="name" id="name"
+ #end if
#if $system
value="$system.name"
#end if
/>
<br/>
+ #if $system
+ <label for="mode">Edit Mode</label>
+ <input type="radio" name="editmode" value="edit" checked onclick="javascript:disablename(true)">Edit
+ <input type="radio" name="editmode" value="rename" onclick="javascript:disablename(false)">Rename + Edit
+ <input type="radio" name="editmode" value="copy" onclick="javascript:disablename(false)">Copy + Edit
+ <br/>
+ #end if
+
<label for="profile">Profile</label>
<select name="profile" id="profile">
#for $profile in $profiles: