diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-18 15:00:07 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-18 15:00:07 -0400 |
commit | 2127d90388fbe29d6b5d0446bd971acaf5051e55 (patch) | |
tree | 4791123585b9b51a52b0ff9a72d1b5fdbe472a94 /webui_templates/profile_edit.tmpl | |
parent | 6fc3f8e8496610eeddc950a04417323b951d6547 (diff) | |
download | third_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/profile_edit.tmpl')
-rw-r--r-- | webui_templates/profile_edit.tmpl | 28 |
1 files changed, 27 insertions, 1 deletions
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: |