source: trunk/templates/assign.tmpl@ 938

Last change on this file since 938 was 916, checked in by Kris Deugau, 7 years ago

/trunk

Continue adding a generalized block-notice system. See #17 and #23, sort of.
Add a retrieval sub for block notices to IPDB.pm
Wrap the new module sub in a local sub in main.cgi, since the primary

web-UI actions will be called from a number of places

Update the block assignment templates and call the new local sub for

block assignment

File size: 5.3 KB
Line 
1<div class="indent">
2
3<TMPL_IF blockmsg><br><div class="strongwarning blockcenter w70"><TMPL_VAR NAME=blockmsg></div><br></TMPL_IF>
4
5<form method="post" action="main.cgi" class="regular">
6<fieldset><legend class="noshow">&nbsp;</legend>
7
8<table class="regular altrows" cellspacing="1" cellpadding="1">
9<tr class="tblsubtitle"><td>Assign IP<TMPL_UNLESS fbip>s</TMPL_UNLESS></td></tr>
10
11<TMPL_IF allocfrom>
12<tr>
13<TMPL_IF fbip>
14<td>IP pool:</td>
15<TMPL_ELSE>
16<td>Free block selected:</td>
17</TMPL_IF>
18<td><TMPL_VAR NAME=allocfrom><input type="hidden" name="allocfrom" value="<TMPL_VAR NAME=allocfrom>">
19<input type="hidden" name="parent" value="<TMPL_VAR NAME=parent>">
20<input type="hidden" name="fbid" value="<TMPL_VAR NAME=fbid>">
21</td>
22</tr>
23<tr>
24<TMPL_IF fbip>
25<td>IP:</td>
26<td>
27<TMPL_VAR NAME=block><input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
28<input type="hidden" name="fbassign" value="y">
29</td>
30<TMPL_ELSE>
31<td>Allocation:</td>
32<td>
33<input name="block" value="<TMPL_VAR NAME=block>" size="40">
34<input type="hidden" name="fbassign" value="y">
35&nbsp;Reserve space to expand block in future
36<input type="checkbox" name="reserve">
37</td>
38</TMPL_IF>
39</tr>
40</TMPL_IF>
41
42<tr>
43<td>Customer location:</td>
44<td>
45<select name="city">
46<TMPL_IF preselected>
47<TMPL_LOOP NAME=citylist>
48 <option<TMPL_IF sel> selected</TMPL_IF>><TMPL_VAR NAME=city></option></TMPL_LOOP>
49<TMPL_ELSE>
50 <option selected="selected">-</option>
51<TMPL_LOOP NAME=citylist>
52 <option><TMPL_VAR NAME=city></option></TMPL_LOOP>
53</TMPL_IF>
54</select>
55&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newcity.cgi')">Add new location</a>
56</td>
57</tr>
58
59<tr>
60<td>Allocation type:</td>
61<td>
62<TMPL_IF fbip>
63<TMPL_VAR NAME=fbdisptype><input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
64<TMPL_ELSE>
65<select name="alloctype">
66<TMPL_LOOP name=typelist>
67 <option value="<TMPL_VAR NAME=type>"<TMPL_IF sel> selected</TMPL_IF>><TMPL_VAR NAME=listname></option></TMPL_LOOP>
68</select>
69<input type="button" value=" ? " onclick="helpAllocTypes()" class="regular">
70</TMPL_IF>
71</td>
72</tr>
73
74<TMPL_UNLESS allocfrom>
75<tr>
76<td>Subnet CIDR mask length:</td>
77<td valign="top">&nbsp;/&nbsp;<input type="text" name="maskbits" size="3" maxlength="3">
78&nbsp;Reserve space to expand block in future
79<input type="checkbox" name="reserve">
80</td>
81</tr>
82</TMPL_UNLESS>
83
84<tr>
85<td>DNS name/pattern:</td>
86<td>
87<input type="text" name="rdns" value="<TMPL_VAR NAME=rdns>" size="40">
88<input type="button" value=" ? " onclick="helpRDNS()" class="regular">
89<TMPL_IF cached>(cached)</TMPL_IF>
90</td>
91</tr>
92
93<tr>
94<td>Customer ID:</td>
95<td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td>
96</tr>
97
98<tr>
99<td>Layer-2/demarc node</td>
100<td>
101<select name="node">
102 <option selected>-</option>
103<TMPL_LOOP NAME=nodelist>
104 <option value="<TMPL_VAR NAME=node_id>"><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
105</select>
106&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new demarc node</a>
107</td>
108</tr>
109
110<TMPL_UNLESS allocfrom>
111<tr>
112<td>Allocate from blocks in this location:</td>
113<td>
114<select name="pop">
115 <option selected value="">-</option>
116<TMPL_LOOP NAME=pops>
117 <option><TMPL_VAR NAME=pop></option></TMPL_LOOP>
118</select>
119</td>
120</tr>
121
122<tr>
123<td>Limit to blocks in this master:&nbsp;</td>
124<td>
125<select name="allocfrom">
126 <option selected="selected">-</option>
127<TMPL_LOOP NAME=masterlist>
128 <option value=<TMPL_VAR NAME=id>><TMPL_VAR NAME=master><TMPL_IF vrf> (<TMPL_VAR NAME=vrf>)</TMPL_IF></option></TMPL_LOOP>
129</select>
130Allow automatic allocation from private IP ranges:<input type="checkbox" name="allowpriv"></td>
131</tr>
132</TMPL_UNLESS>
133
134<tr>
135<td>VLAN:</td>
136<td><input name="vlan" size="40" value="<TMPL_VAR NAME=pvlan>"></td>
137</tr>
138
139<tr>
140<td>Circuit ID:</td>
141<td><input name="circid" size="40"></td>
142</tr>
143
144<tr>
145<td>Description/Name:</td>
146<td><input name="desc" size="72"></td>
147</tr>
148
149<tr>
150<td>Notes:&nbsp;</td>
151<td><textarea name="notes" rows="8" cols="72" class="regular"></textarea></td>
152</tr>
153
154<TMPL_IF nocling>
155<tr>
156<td>Restricted data:</td>
157<td><textarea name="privdata" rows="8" cols="72" class="regular"></textarea></td>
158</tr>
159
160<tr>
161<td>Configuration backup:</td>
162<td>
163<ul class="collapsible notalist"><li>
164<label for="backupfields">Device/assignment requires backup?</label>
165<input type="checkbox" id="backupfields" name="backupfields" />
166<ul class="notalist"><li>
167<table><tr><td>Brand:</td><td><input name="bkbrand"></td></tr>
168<tr><td>Model:</td><td><input name="bkmodel"></td></tr>
169<tr><td colspan="2">Optional settings if different from standard ones for the device type above:</td></tr>
170<tr><td>Access method:</td><td><select name="bktype">
171<option selected="selected">SSH</option>
172<option>telnet</option>
173</select></td></tr>
174<tr><td>Connect from:</td><td><input name="bksrc"></td></tr>
175<tr><td>Username:</td><td><input name="bkuser"></td></tr>
176<tr><td>VTY password:</td><td><input name="bkvpass"></td></tr>
177<tr><td>Enable password:</td><td><input name="bkepass"></td></tr>
178<tr><td>Alternate port (if required):</td><td><input name="bkport"></td></tr>
179<tr><td>IP (if device is part of a netblock assignment):</td><td><input name="bkip"></td></tr>
180</table>
181</li></ul>
182</li></ul>
183</td>
184</tr>
185</TMPL_IF>
186
187<tr>
188<td class="center" colspan="2"><input type="submit" value=" Assign "></td>
189</tr>
190
191</table>
192
193<input type="hidden" name="action" value="confirm">
194</fieldset>
195</form>
196
197</div>
Note: See TracBrowser for help on using the repository browser.