summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cobbler/webui/CobblerWeb.py11
-rw-r--r--webui_content/cobblerweb.css5
-rw-r--r--webui_templates/profile_edit.tmpl19
3 files changed, 27 insertions, 8 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py
index bfa257b..3d05520 100644
--- a/cobbler/webui/CobblerWeb.py
+++ b/cobbler/webui/CobblerWeb.py
@@ -510,6 +510,7 @@ class CobblerWeb(object):
'edit' : True,
'profile': input_profile,
'distros': self.remote.get_distros(),
+ 'repos': self.remote.get_repos(),
'ksfiles': self.remote.get_kickstart_templates(self.token)
} )
@@ -565,8 +566,16 @@ class CobblerWeb(object):
self.remote.modify_profile(profile, 'virt-type', virttype, self.token)
if virtpath:
self.remote.modify_profile(profile, 'virt-path', virtpath, self.token)
- if repos:
+
+ if repos is None:
+ repos = []
+ if type(repos) == type(str()):
+ repos = [ repos ]
+ if type(repos) == type([]):
+ if '--none--' in repos:
+ repos.remove( '--none--' )
self.remote.modify_profile(profile, 'repos', repos, self.token)
+
if dhcptag:
self.remote.modify_profile(profile, 'dhcp-tag', dhcptag, self.token)
self.remote.save_profile(profile,self.token)
diff --git a/webui_content/cobblerweb.css b/webui_content/cobblerweb.css
index c19ffc2..75367cd 100644
--- a/webui_content/cobblerweb.css
+++ b/webui_content/cobblerweb.css
@@ -15,6 +15,11 @@ textarea#ksdata {
height: 100%;
}
+select#repos {
+ width: 256px;
+ height: 8em;
+}
+
pre.config_data {
font-family: monospace;
background: white;
diff --git a/webui_templates/profile_edit.tmpl b/webui_templates/profile_edit.tmpl
index 1727b4e..28af17e 100644
--- a/webui_templates/profile_edit.tmpl
+++ b/webui_templates/profile_edit.tmpl
@@ -199,18 +199,23 @@ function disablename(value)
</td>
</tr>
- ## FIXME: this should be a multi-select
<tr>
<td>
<label for="repos">Repo Names</label>
</td>
<td>
- <input type="text" style="width: 150px;" name="repos" id="repos"
- #if $profile
- value="$profile.repos"
- #end if
- />
- <p class="context-tip">Example: "el5i386updates el5epeltesting el5mycontent"</p>
+
+ <select name="repos" id="repos" multiple="1">
+ <option value="--none--"> -- none -- </option>
+ #for $repo in $repos:
+ <option value="$repo.name"
+ #if $profile and $repo.name in $profile.repos
+ selected="1"
+ #end if
+ >$repo.name</option>
+ #end for
+ </select>
+ <p class="context-tip">Select one or many additional repos to automatically assign to the target system. (this is a good place to include an updates repo)</p>
</td>
</tr>