summaryrefslogtreecommitdiffstats
path: root/webui_templates/profile_edit.tmpl
blob: 5c46d6ba60e555ce3939eb8cdd8a7a784a29414f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#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">

<!--
       cobbler profile add -name=string -distro=string [-kickstart=url]
       [-kopts=string] [-ksmeta=string] [-virt-file-size=gigabytes]
       [-virt-ram=megabytes] [-virt-type=string] [-virt-path=string]
-->

    #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"/>
    #end if


    <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:
        <option name="$distro.name"
             #if $profile and $profile.distro == $distro
                 selected="true"
             #end if
        >$distro.name
        </option>
        #end for
    </select>
    <br/>

    <!-- should allow freeform input but still show a list of choices? -->
    <!-- probably should implement a combo box eventually -->

    <label for="kickstart">Kickstart File</label>
    <input type="text" size="128" style="width: 150px;" name="kickstart" id="kickstart"
        #if $profile
            value="$profile.kickstart" 
        #end if
    />
    <br/>

    <label for="kopts">Kernel Options</label>
    <input type="text" size="128" style="width: 150px;" name="kopts" id="kopts"
        #if $profile
            value="$profile.kernel_options"
        #end if
    />
    <br/>

    <label for="ksmeta">Kickstart Metadata</label>
    <input type="text" size="128" style="width: 150px;" name="ksmeta" id="ksmeta"
        #if $profile
           value="$profile.ks_meta"
        #end if
    />
    <br/>

    <label for="virtfilesize">Virt File Size (GB)</label>
    <input type="text" size="128" style="width: 150px;" name="virtfilesize" id="virtfilesize"
        #if $profile
           value="$profile.virt_file_size"
        #end if
    />
    <br/>

    <label for="virtram">Virt RAM (MB)</label>
    <input type="text" size="128" style="width: 150px;" name="virtram" id="virtram"
        #if $profile
           value="$profile.virt_ram"
        #end if
    />
    <br/>

    <label for="virttype">Virt Type (xenpv, qemu)</label>
    <input type="text" size="128" style="width: 150px;" name="virttype" id="virttype"
        #if $profile
           value="$profile.virt_type"
        #end if
    />
    <br/>

    <label for="virtpath">Virt Path</label>
    <input type="text" size="128" style="width: 150px;" name="virtpath" id="virtpath"
        #if $profile
           value="$profile.virt_path"
        #end if
    />
    <br/>

    <label for="repos">Repo Names</label>
    <input type="text" size="128" style="width: 150px;" name="repos" id="repos"
        #if $profile
           value="$profile.repos"
        #end if
    />
    <br/>

    <label for="dhcptag">DHCP Tag</label>
    <input type="text" size="128" style="width: 150px;" name="dhcptag" id="dhcptag"
        #if $profile
           value="$profile.dhcp_tag" 
        #end if
    />
    <br/>

    #if $profile
    <label for="delete">Delete</label>
       <input type="checkbox" name="delete1" value="delete1">Yes
       <input type="checkbox" name="delete2" value="delete2">Really
    <br/>
    #end if



    <input type="submit" name="submit" value="Save"/>
    <input type="reset" name="reset" value="Reset"/>

</fieldset>
#end block body