source: trunk/templates/edit.tmpl@ 676

Last change on this file since 676 was 675, checked in by Kris Deugau, 10 years ago

/trunk

Extend per-IP rDNS through the "confirm add" page and the "edit" page. See #1.

  • Add flag in getBlockRDNS return to indicate if the results are from local caching instead of RPC results. There isn't really a clear way to globally flag "RPC server is up".
  • Add a sub to retrieve per-IP reverse DNS information for a passed CIDR range. Not limited in IPDB.pm, but dnsadmin will refuse to return anything for a block larger than /24 (v4) or /120 (v6) - an 8 bit inverse mask.
  • Use the new sub on editing a small(ish) non-pool block. CSS magic notwithstanding, handling more than 32 IPs in a list like this is awkward.
File size: 5.1 KB
Line 
1<TMPL_IF webpath></TMPL_IF>
2<div class="indent">
3<div class="heading">Edit the information below</div>
4
5<table cellpadding="0" cellspacing="0">
6<tr>
7<td>
8
9<TMPL_IF maychange>
10<form method="POST" action="main.cgi">
11<fieldset><legend class="noshow">&nbsp;</legend>
12<input type="hidden" name="action" value="update">
13<input type="hidden" name="block" value="<TMPL_VAR NAME=id>">
14</TMPL_IF>
15
16<table cellspacing="1">
17
18<tr class="row0">
19<td class=heading>IP block:</td>
20<td class="regular"><TMPL_VAR NAME=block></td>
21</tr>
22
23<tr class="row1">
24<td class="heading">Reverse DNS:</td>
25<td class="regular">
26Pattern: <TMPL_IF maychange>
27<input type="text" name="rdns" size="40" value="<TMPL_VAR NAME=rdns>">
28<TMPL_ELSE>
29<TMPL_VAR NAME=rdns>
30</TMPL_IF>
31<input type="button" value=" ? " onclick="helpRDNS()" class="regular">
32<TMPL_IF cached>(cached)</TMPL_IF>
33<TMPL_IF r_iplist>
34<div class="rdns revdata">
35<ul class="collapsible notalist">
36<li>
37<label for="per-iplist">Per-IP reverse entries (click to show) <img src="<TMPL_VAR NAME=webpath>/images/tree_open.png"></label>
38<input type="checkbox" id="per-iplist" />
39<ul class="notalist">
40<li>
41<table>
42<TMPL_LOOP name="r_iplist">
43<tr>
44<td><TMPL_VAR NAME=r_ip></td>
45<td><input class="host" name="host_<TMPL_VAR NAME=r_ip>" value="<TMPL_VAR NAME=iphost>"></td>
46</tr>
47</TMPL_LOOP>
48</table>
49</li>
50</ul>
51</li>
52</ul>
53</div>
54</TMPL_IF>
55</td>
56</tr>
57
58<tr class="row0">
59<td class=heading>City:</td>
60<td class="regular">
61<TMPL_IF maychange>
62<input type=text name=city value="<TMPL_VAR NAME=city>">
63<TMPL_ELSE>
64<TMPL_VAR NAME=city>
65</TMPL_IF>
66</td>
67</tr>
68
69<tr class="row1">
70<td class=heading>Type:</td>
71<td class=regular>
72<TMPL_IF changetype>
73<select name=alloctype>
74<TMPL_LOOP name=alloctype> <option <TMPL_IF selme>selected="selected"</TMPL_IF> value="<TMPL_VAR NAME=type>"><TMPL_VAR NAME=disptype></option>
75</TMPL_LOOP>
76</select>
77<TMPL_ELSE>
78<TMPL_VAR NAME=disptype>
79<input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
80</TMPL_IF>
81</td>
82</tr>
83
84<tr class="row0">
85<td class=heading>Layer-2/demarc node:</td>
86<td class=regular>
87<TMPL_IF maychange>
88<select name="node">
89 <option selected="selected">--</option>
90<TMPL_LOOP NAME=nodelist>
91 <option value="<TMPL_VAR NAME=node_id>"<TMPL_IF selme> selected</TMPL_IF>><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
92</select>
93&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new demarc node</a>
94<TMPL_ELSE>
95<TMPL_IF nodename><TMPL_VAR NAME=nodename><TMPL_ELSE>N/A</TMPL_IF>
96</TMPL_IF>
97</td>
98</tr>
99
100<tr class="row1">
101<td class=heading>CustID:</td>
102<td class="regular">
103<TMPL_IF maychange>
104<input type=text name=custid value="<TMPL_VAR NAME=custid>" maxlength=15 class="regular">
105<TMPL_ELSE>
106<TMPL_VAR NAME=custid>
107</TMPL_IF>
108</td>
109</tr>
110
111<tr class="row0">
112<td class=heading>SWIPed?:</td>
113<td class=regular>
114<TMPL_IF swipable>
115<TMPL_IF maychange>
116<input type="checkbox" name="swip"<TMPL_IF swip> checked="checked"</TMPL_IF>>
117<TMPL_ELSE>
118<TMPL_IF swip>Yes<TMPL_ELSE>No</TMPL_IF>
119</TMPL_IF>
120<TMPL_ELSE>
121N/A
122</TMPL_IF>
123</td>
124</tr>
125
126<tr class="row1">
127<td class=heading>Last modified:</td>
128<td class=regular><TMPL_VAR NAME=lastmod></td>
129</tr>
130
131<tr class="row0">
132<td class="heading">Circuit ID:</td>
133<td class="regular">
134<TMPL_IF maychange>
135<input type="text" name="circid" value="<TMPL_VAR ESCAPE=HTML NAME=circid>" maxlength=64 size=64 class="regular">
136<TMPL_ELSE>
137<TMPL_VAR ESCAPE=HTML NAME=circid>
138</TMPL_IF>
139</td>
140</tr>
141
142<tr class="row1">
143<td class="heading">Description/Name:</td>
144<td class="regular">
145<TMPL_IF maychange>
146<input type="text" name="desc" value="<TMPL_VAR ESCAPE=HTML NAME=desc>" maxlength=64 size=64 class="regular">
147<TMPL_ELSE>
148<TMPL_VAR ESCAPE=HTML NAME=desc>
149</TMPL_IF>
150</td>
151</tr>
152
153<tr class="row0">
154<td class="heading" valign="top">Notes:</td>
155<td class="regular">
156<TMPL_IF maychange><textarea rows="8" cols="64" name="notes" class="regular"><TMPL_VAR ESCAPE=HTML NAME=notes></textarea>
157<TMPL_ELSE>
158<TMPL_VAR ESCAPE=HTML NAME=notes>
159</TMPL_IF>
160</td>
161</tr>
162
163<TMPL_IF nocling>
164<tr class="row1">
165<td class="heading" valign="top">Restricted data:</td>
166<td class="regular">
167<TMPL_IF maychange>
168<textarea rows="3" cols="64" name="privdata" class="regular"><TMPL_VAR ESCAPE=HTML NAME=privdata></textarea>
169<TMPL_ELSE>
170<TMPL_VAR ESCAPE=HTML NAME=privdata>
171</TMPL_IF>
172</td>
173</tr>
174</TMPL_IF>
175
176<TMPL_IF maychange>
177<tr class="row<TMPL_IF nocling>0<TMPL_ELSE>1</TMPL_IF>">
178<td colspan="2" class="center">
179<input type="hidden" name="basetype" value="<TMPL_VAR NAME=basetype>">
180<input type="submit" value=" Update this block " class="regular">
181</td>
182</tr>
183</TMPL_IF>
184</table>
185<TMPL_IF maychange>
186</fieldset>
187</form>
188</TMPL_IF>
189
190<TMPL_IF maydel>
191</td></tr>
192<tr><td class="center">
193<form method="POST" action="main.cgi">
194<fieldset><legend class="noshow">&nbsp;</legend>
195<div class="row<TMPL_IF nocling><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>0<TMPL_ELSE>1</TMPL_IF></TMPL_IF>">
196<input type="hidden" name="action" value="delete">
197<input type="hidden" name="block" value="<TMPL_VAR NAME=id>">
198<input type="hidden" name="basetype" value="<TMPL_VAR NAME=basetype>">
199<input type=submit value=" Delete this block ">
200</div>
201</fieldset>
202</form>
203</TMPL_IF>
204
205</td>
206</tr>
207</table>
208
209</div>
Note: See TracBrowser for help on using the repository browser.