source: trunk/templates/edit.tmpl@ 551

Last change on this file since 551 was 534, checked in by Kris Deugau, 12 years ago

/trunk

Clean up and merge SQL for block-edit page into getBlockData.
Fortunately, the enhancement does not affect previous uses of
that sub. See #34.
Also tweak the template with a whitespace nitpick and to escape
HTML-funky characters in the circuit ID, description, notes, or
restricted data. Still need to confirm these can be reversed
on submission. See The Ticket That Won't Die, #3.

File size: 4.2 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=block>">
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>City:</td>
25<td class="regular">
26<TMPL_IF maychange>
27<input type=text name=city value="<TMPL_VAR NAME=city>">
28<TMPL_ELSE>
29<TMPL_VAR NAME=city>
30</TMPL_IF>
31</td>
32</tr>
33
34<tr class="row0">
35<td class=heading>Type:</td>
36<td class=regular>
37<TMPL_IF changetype>
38<select name=alloctype>
39<TMPL_LOOP name=alloctype> <option <TMPL_IF selme>selected="selected"</TMPL_IF> value="<TMPL_VAR NAME=type>"><TMPL_VAR NAME=disptype></option>
40</TMPL_LOOP>
41</select>
42<TMPL_ELSE>
43<TMPL_VAR NAME=disptype>
44<input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
45</TMPL_IF>
46</td>
47</tr>
48
49<tr class="row1">
50<td class=heading>Demarc/tower:</td>
51<td class=regular>
52<TMPL_IF typesupportsnodes>
53<TMPL_IF maychange>
54<select name="node"><TMPL_UNLESS havenodeid>
55 <option selected="selected">--</option></TMPL_UNLESS>
56<TMPL_LOOP NAME=nodelist>
57 <option value="<TMPL_VAR NAME=node_id>"<TMPL_IF selme> selected</TMPL_IF>><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
58</select>
59<TMPL_ELSE>
60<TMPL_IF nodename><TMPL_VAR NAME=nodename><TMPL_ELSE>N/A</TMPL_IF>
61</TMPL_IF>
62<TMPL_ELSE>
63N/A
64</TMPL_IF>
65</td>
66</tr>
67
68<tr class="row0">
69<td class=heading>CustID:</td>
70<td class="regular">
71<TMPL_IF maychange>
72<input type=text name=custid value="<TMPL_VAR NAME=custid>" maxlength=15 class="regular">
73<TMPL_ELSE>
74<TMPL_VAR NAME=custid>
75</TMPL_IF>
76</td>
77</tr>
78
79<tr class="row1">
80<td class=heading>SWIPed?:</td>
81<td class=regular>
82<TMPL_IF swipable>
83<TMPL_IF maychange>
84<input type="checkbox" name="swip"<TMPL_IF swip> checked="checked"</TMPL_IF>>
85<TMPL_ELSE>
86<TMPL_IF swip>Yes<TMPL_ELSE>No</TMPL_IF>
87</TMPL_IF>
88<TMPL_ELSE>
89N/A
90</TMPL_IF>
91</td>
92</tr>
93
94<tr class="row0">
95<td class=heading>Last modified:</td>
96<td class=regular><TMPL_VAR NAME=lastmod></td>
97</tr>
98
99<tr class="row1">
100<td class="heading">Circuit ID:</td>
101<td class="regular">
102<TMPL_IF maychange>
103<input type="text" name="circid" value="<TMPL_VAR ESCAPE=HTML NAME=circid>" maxlength=64 size=64 class="regular">
104<TMPL_ELSE>
105<TMPL_VAR ESCAPE=HTML NAME=circid>
106</TMPL_IF>
107</td>
108</tr>
109
110<tr class="row0">
111<td class="heading">Description/Name:</td>
112<td class="regular">
113<TMPL_IF maychange>
114<input type="text" name="desc" value="<TMPL_VAR ESCAPE=HTML NAME=desc>" maxlength=64 size=64 class="regular">
115<TMPL_ELSE>
116<TMPL_VAR ESCAPE=HTML NAME=desc>
117</TMPL_IF>
118</td>
119</tr>
120
121<tr class="row1">
122<td class="heading" valign="top">Notes:</td>
123<td class="regular">
124<TMPL_IF maychange><textarea rows="8" cols="64" name="notes" class="regular"><TMPL_VAR ESCAPE=HTML NAME=notes></textarea>
125<TMPL_ELSE>
126<TMPL_VAR ESCAPE=HTML NAME=notes>
127</TMPL_IF>
128</td>
129</tr>
130
131<TMPL_IF nocling>
132<tr class="row0">
133<td class="heading" valign="top">Restricted data:</td>
134<td class="regular">
135<TMPL_IF maychange>
136<textarea rows="3" cols="64" name="privdata" class="regular"><TMPL_VAR ESCAPE=HTML NAME=privdata></textarea>
137<TMPL_ELSE>
138<TMPL_VAR ESCAPE=HTML NAME=privdata>
139</TMPL_IF>
140</td>
141</tr>
142</TMPL_IF>
143
144<TMPL_IF maychange>
145<tr class="row<TMPL_IF nocling>1<TMPL_ELSE>0</TMPL_IF>">
146<td colspan="2" class="center">
147<input type="submit" value=" Update this block " class="regular">
148</td>
149</tr>
150</TMPL_IF>
151</table>
152<TMPL_IF maychange>
153</fieldset>
154</form>
155</TMPL_IF>
156
157<TMPL_IF maydel>
158</td></tr>
159<tr><td class="center">
160<form method="POST" action="main.cgi">
161<fieldset><legend class="noshow">&nbsp;</legend>
162<div class="row<TMPL_IF nocling><TMPL_IF maychange>0<TMPL_ELSE>1</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF></TMPL_IF>">
163<input type="hidden" name="action" value="delete">
164<input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
165<input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
166<input type=submit value=" Delete this block ">
167</div>
168</fieldset>
169</form>
170</TMPL_IF>
171
172</td>
173</tr>
174</table>
175
176</div>
Note: See TracBrowser for help on using the repository browser.