source: trunk/templates/record.tmpl@ 438

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