source: trunk/templates/record.tmpl@ 473

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

/trunk

Extend location view on the record page to either show a dropdown
when adding/editing if the user has record_locchg permission, or
just show the location's short description if not. See #10.
Also add the new permission to the permissions subtemplate.

File size: 3.2 KB
Line 
1<!-- <TMPL_VAR NAME=sid> -->
2<table class="wholepage"><tr>
3<TMPL_INCLUDE NAME="menu.tmpl">
4
5<td align="center" valign="top">
6
7<TMPL_IF perm_err>
8<div class='errmsg'><TMPL_VAR NAME=perm_err></div>
9<TMPL_ELSE>
10
11<form action="dns.cgi" method="post">
12<fieldset>
13
14<input type="hidden" name="page" value="record" />
15<input type="hidden" name="defrec" value="<TMPL_VAR NAME=defrec>" />
16<input type="hidden" name="revrec" value="<TMPL_VAR NAME=revrec>" />
17<input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
18<input type="hidden" name="parentid" value="<TMPL_VAR NAME=parentid>" />
19<input type="hidden" name="id" value="<TMPL_VAR NAME=id>" />
20<input type="hidden" name="recact" value="<TMPL_VAR NAME=recact>" />
21
22<table class="container" width="450">
23<tr><td>
24
25 <table border="0" cellspacing="2" cellpadding="2" width="100%">
26<TMPL_IF failed> <tr><td class="errhead" colspan="2">Error <TMPL_VAR NAME=wastrying> record: <TMPL_VAR NAME=errmsg></td></tr></TMPL_IF>
27 <tr class="tableheader"><td align="center" colspan="2"><TMPL_VAR NAME=todo>: <TMPL_VAR NAME=dohere></td></tr>
28 <tr class="datalinelight">
29<TMPL_IF fwdzone>
30 <td>Hostname</td>
31 <td><input type="text" name="name" value="<TMPL_VAR NAME=name>" size="30" /></td>
32<TMPL_ELSE>
33 <td>IP Address</td>
34 <td><input type="text" name="address" value="<TMPL_VAR ESCAPE=HTML NAME=address>" size="30" /></td>
35</TMPL_IF>
36 </tr>
37 <tr class="datalinelight">
38 <td>Type</td>
39 <td><select name="type">
40<TMPL_LOOP NAME=typelist>
41 <option value="<TMPL_VAR NAME=recval>"<TMPL_IF NAME=tselect> selected="selected"</TMPL_IF>><TMPL_VAR NAME=recname></option>
42</TMPL_LOOP>
43 </select></td>
44 </tr>
45 <tr class="datalinelight">
46<TMPL_IF fwdzone>
47 <td>Address</td>
48 <td><input type="text" name="address" value="<TMPL_VAR ESCAPE=HTML NAME=address>" size="30" /></td>
49<TMPL_ELSE>
50 <td>Hostname</td>
51 <td><input type="text" name="name" value="<TMPL_VAR NAME=name>" size="30" /></td>
52</TMPL_IF>
53 </tr>
54<TMPL_IF fwdzone>
55 <tr class="datalinelight">
56 <td>Distance (MX and SRV only)</td>
57 <td><input type="text" name="distance" value="<TMPL_VAR NAME=distance>" size="5" maxlength="10" /></td>
58 </tr>
59 <tr class="datalinelight">
60 <td>Weight (SRV only)</td>
61 <td><input type="text" name="weight" value="<TMPL_VAR NAME=weight>" size="5" maxlength="10" /></td>
62 </tr>
63 <tr class="datalinelight">
64 <td>Port (SRV only)</td>
65 <td><input type="text" name="port" value="<TMPL_VAR NAME=port>" size="5" maxlength="10" /></td>
66 </tr>
67</TMPL_IF>
68 <tr class="datalinelight">
69 <td>TTL</td>
70 <td><input size="7" maxlength="20" type="text" name="ttl" value="<TMPL_VAR NAME=ttl>" /></td>
71 </tr>
72<TMPL_IF location_view>
73 <tr class="datalinelight">
74 <td>Location/view</td>
75<TMPL_IF record_locchg>
76 <td><select name="location">
77<TMPL_LOOP name=loclist> <option value="<TMPL_VAR NAME=loc>"<TMPL_IF selected> selected="selected"</TMPL_IF>><TMPL_VAR NAME=locname></option>
78</TMPL_LOOP>
79 </select></td>
80<TMPL_ELSE>
81 <td><TMPL_VAR NAME=loc_name></td>
82</TMPL_IF>
83 </tr>
84</TMPL_IF>
85 <tr class="datalinelight">
86 <td colspan="2" align="center"><input type="submit" value=" <TMPL_VAR NAME=todo> " /></td>
87 </tr>
88 </table>
89
90</td></tr>
91</table>
92
93</fieldset>
94</form>
95
96</TMPL_IF>
97
98</td>
99</tr>
100</table>
Note: See TracBrowser for help on using the repository browser.