summaryrefslogtreecommitdiffstats
path: root/webui_templates/repo_edit.tmpl
blob: c259a13db59e3a39964d1fa43d0fba3de0baf872 (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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#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

#if $editable != True
#set global $owners = $repo.owners
#include "/usr/share/cobbler/webui_templates/enoaccess.tmpl"
#end if

<form method="post" action="$base_url?mode=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
 
    <table border=0>
    
    <tr>
    <td>
    <label for="name">Name</label>
    </td>
    <td>
    #if $repo
    <input type="text" size="128" style="width: 150px;" name="name" id="name" disabled="true"
    #else
    <input type="text" size="128" style="width: 150px;" name="name" id="name"
    #end if
        #if $repo
            value="$repo.name"
        #end if
    />
    <p class="context-tip">Example: EL-5-i386-EPEL-testing</p>
    </td>
    </tr>

    #if $repo
    <tr>
    <td>
    <label for="mode">Edit Mode</label>
    </td>
    <td>
    <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
    <p class="context-tip">How do you want to modify this object?</p>
    </td>
    </tr>
    #else
    <input type="hidden" name="editmode" value="new"/>
    #end if

    <tr>
    <td>
    <label for="mirror">Mirror Location (http/ftp/rsync)</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 400px;" name="mirror" id="mirror"
        #if $repo
            value="$repo.mirror"
        #end if
    />
    <p class="context-tip">Full and EXACT url path (see docs).  Can be http://, ftp://, local, or rsync://</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="keep_updated">Keep Updated</label>
    </td>
    <td>
    <input type="checkbox" name="keep_updated" id="keep_updated"
        #if (not $repo) or $repo.keep_updated
            checked="true"  
        #end if
    />
    <p class="context-tip">Uncheck to prevent the mirror from being updated again.</p>    
    </td>
    </tr>
    <br/>

    <tr>
    <td>
    <label for="keep_updated">Mirror Locally</label>
    </td>
    <td>
    <input type="checkbox" name="mirror_locally" id="mirror_locally"
        #if (not $repo) or $repo.mirror_locally
            checked="true"
        #end if
    />
    <p class="context-tip">Uncheck to reference the repository directly instead of mirroring.</p>
    </td>
    </tr>
    <br/>

    <tr>
    <td>
    <label for="priority">Priority</label>
    </td>
    <td>
    <input type="text" size="512" style="width: 150px;" name="priority" id="priority"
        #if $repo
            value="$repo.priority"
        #end if
    />
    <p class="context-tip">Repo priority, if using yum priorities plugin of target (99=default) </p>
    </td>
    </tr>
    <br/>

    ## FIXME: input field sizes should be larger (universally)
    ## FIXME: make this a text area?

    <tr>
    <td>
    <label for="rpm_list">RPM List</label>
    </td>
    <td>
    <input type="text" size="512" style="width: 400px;" name="rpm_list" id="rpm_list"
        #if $repo
            value="$repo.rpm_list"
        #end if
    />
    <p class="context-tip">Blank, or a list of specific RPMs (and only those RPMs) to mirror.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="createrepo_flags">Createrepo flags</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="creatrepoflags" id="createrepoflags"
        #if $repo
            value="$repo.createrepo_flags"
        #end if
    />
    <p class="context-tip">Additional flags to pass to yum's createrepo if http or ftp.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="arch">Arch</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="arch" id="arch"
        #if $repo
            value="$repo.arch"
        #end if
    />
    <p class="context-tip">Overrides the local system arch when mirroring with yum.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="yumopts">Yum options</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="yumopts" id="yumopts" 
        #if $repo
            value="$repo.yumopts" 
        #end if
    />
    <p class="context-tip">Sets specific yum plugin parameters on the installed system.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="owners">Access Allowed For</label>
    </td>
    <td>
    #if $repo
       #set ownerslist = ','.join($repo.owners)
    #end if
    <input type="text" size="255" style="width: 400px;" name="owners" id="owners"
        #if $repo
            value="$ownerslist"
        #else
            value="$user"
        #end if
    />
    <p class="context-tip">Applies only if using authz_ownership module, comma-delimited</p>
    </td>
    </tr>


    #if $repo and $editable == True
    <tr>
    <td>
    <label for="delete">Delete</label>
    </td>
    <td>
       <input type="checkbox" name="delete1" value="delete1">Yes
       <input type="checkbox" name="delete2" value="delete2">Really
    <p class="context-tip">Check both buttons and click save to delete this object.</p>
    </td>
    </tr>
    #end if

    #if $editable == True
    <tr>
    <td>
    </td>
    <td>
    <input type="submit" name="submit" value="Save"/>
    <input type="reset" name="reset" value="Reset"/>
    </tr>
    #end if
 
</table>
</fieldset>
</form>
<br/>    

<blockquote>
Note:  Newly added repo definitions will not be usable until
"cobbler reposync" is run from the command line on this system.
Placing "cobbler reposync" on a crontab is recommended procedure.
</blockquote>

<br/>
#end block body