PageRenderTime 38ms CodeModel.GetById 3ms RepoModel.GetById 1ms app.codeStats 0ms

/branches/1.2.0/templates/en_US/sites_add.tpl

http://scalr.googlecode.com/
Smarty Template | 197 lines | 190 code | 7 blank | 0 comment | 58 complexity | 5e05edea1b94e86cebc19e6e42b226a3 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, GPL-3.0
  1. {include file="inc/header.tpl"}
  2. <script language="javascript" type="text/javascript">
  3. {literal}
  4. function CheckPrAdd(tp, id, val)
  5. {
  6. $("spf_link_"+id).style.display = 'none';
  7. $(tp+"_"+id+"_weight").style.display = 'none';
  8. $(tp+"_"+id+"_port").style.display = 'none';
  9. if (val == 'MX')
  10. {
  11. $(tp+"_"+id).style.display = '';
  12. $(tp+"_"+id).value = '10';
  13. }
  14. else if (val == 'SRV')
  15. {
  16. $(tp+"_"+id).style.display = '';
  17. $(tp+"_"+id+"_weight").style.display = '';
  18. $(tp+"_"+id+"_port").style.display = '';
  19. }
  20. else if (val == 'TXT')
  21. {
  22. $(tp+"_"+id).style.display = 'none';
  23. $(tp+"_"+id).value = '';
  24. $("spf_link_"+id).style.display = '';
  25. }
  26. else
  27. {
  28. $(tp+"_"+id).style.display = 'none';
  29. $(tp+"_"+id).value = '';
  30. }
  31. }
  32. {/literal}
  33. </script>
  34. <script type="text/javascript" src="js/class.NewPopup.js"></script>
  35. <link href="css/popup.css" rel="stylesheet" type="text/css" />
  36. <br>
  37. {assign var=button2_name value="Save"}
  38. {assign var=nofilter value="1"}
  39. {assign var=nofilter value="1"}
  40. {if $ezone && $domainname}
  41. {include file="inc/table_header.tpl" nofilter=1}
  42. <div id="google_btn" style="padding-left: 5px; padding-top: 5px; padding-bottom: 5px;">
  43. <input style="vertical-align:middle;" type="button" onclick="location.href='dns_zone_config.php?zone={$ezone}'" name="DNS_zone_transfers" value="Configure DNS zone transfers" class="btn" />
  44. <span style="padding-left:10px"><input style="vertical-align:middle;" type="submit" name="setup_google_apps_mx_records" value="Setup Google Apps MX records" class="btn" {if $disable_btn_setup_google_apps_mx == true}Disabled{/if} /></span>
  45. </div>
  46. {include file="inc/table_footer.tpl" disable_footer_line=1 color="Gray"}
  47. <br />
  48. {/if}
  49. {include file="inc/table_header.tpl" nofilter=1}
  50. {if !$domainname && !$ezone}
  51. {include file="inc/intable_header.tpl" header="Application information" color="Gray"}
  52. <tr>
  53. <td width="15%">{t}Farm{/t}:</td>
  54. <td colspan="6">{$farm.name} <input type='hidden' name='farmid' value="{$farm.id}" /></td>
  55. </tr>
  56. <tr>
  57. <td width="15%">{t}Traffic will go to{/t}:</td>
  58. <td colspan="6">
  59. <select name="ami_id" class="text">
  60. {section name=id loop=$roles}
  61. <option value="{$roles[id].ami_id}">{$roles[id].name} ({$roles[id].ami_id})</option>
  62. {/section}
  63. </select>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td width="15%">{t}Domain or subdomain name{/t}:</td>
  68. <td colspan="6"><input type="text" class="text" name="domainname" /></td>
  69. </tr>
  70. {include file="inc/intable_footer.tpl" color="Gray"}
  71. {assign var=button2_name value="Next"}
  72. {else}
  73. <table cellpadding="4" cellspacing="0" width="100%">
  74. <tr>
  75. <td>{$domainname}</td>
  76. <td><input type="text" class="text" disabled name="zone[soa_ttl]" size="6" value="{if $zone.soa_ttl}{$zone.soa_ttl}{else}14400{/if}"></td>
  77. <td>IN</td>
  78. <td>SOA</td>
  79. <td><input type="text" class="text" disabled name="zone[soa_parent]" size="30" value="{if $zone.soa_parent}{$zone.soa_parent}{else}{$def_soa_parent}{/if}"></td>
  80. <td><input type="text" class="text" name="zone[soa_owner]" size="30" value="{if $zone.soa_owner}{$zone.soa_owner}{else}{$def_soa_owner}{/if}"></td>
  81. <td></td>
  82. </tr>
  83. <tr>
  84. <td colspan=4></td>
  85. <td>Serial Number:</td>
  86. <td><input type="text" class="text" disabled name="zone[soa_serial]" size=12 value="{if $zone.soa_serial}{$zone.soa_serial}{else}{$def_sn}{/if}"></td>
  87. </tr>
  88. <tr>
  89. <td colspan=4></td>
  90. <td>Refresh:</td>
  91. <td><input type="text" class="text" disabled name="zone[soa_refresh]" size=12 value="{if $zone.soa_refresh}{$zone.soa_refresh}{else}14400{/if}"></td>
  92. </tr>
  93. <tr>
  94. <td colspan=4></td>
  95. <td>Retry:</td>
  96. <td><input type="text" class="text" disabled name="zone[soa_retry]" size=12 value="{if $zone.soa_retry}{$zone.soa_retry}{else}7200{/if}"></td>
  97. </tr>
  98. <tr>
  99. <td colspan=4></td>
  100. <td>Expire:</td>
  101. <td>
  102. <select name="zone[soa_expire]" class="text">
  103. <option {if $zone.soa_expire == 86400}selected{/if} value="86400">1 day</option>
  104. <option {if $zone.soa_expire == 259200}selected{/if} value="259200">3 days</option>
  105. <option {if $zone.soa_expire == 432000}selected{/if} value="432000">5 days</option>
  106. <option {if $zone.soa_expire == 604800}selected{/if} value="604800">1 week</option>
  107. <option {if $zone.soa_expire == 3024000 || $zone.soa_expire == 3600000}selected{/if} value="3024000">5 weeks</option>
  108. <option {if $zone.soa_expire == 6048000}selected{/if} value="6048000">10 weeks</option>
  109. </select>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td colspan=4></td>
  114. <td>Minimum TTL:</td>
  115. <td><input type="text" class="text" disabled name="zone[min_ttl]" size=12 value="{if $zone.min_ttl}{$zone.min_ttl}{else}86400{/if}"></td>
  116. <td></td>
  117. </tr>
  118. <tr>
  119. <td class="th">{t}Domain{/t}</td>
  120. <td class="th">{t}TTL{/t}</td>
  121. <td class="th">&nbsp;</td>
  122. <td class="th">{t}Record Type{/t}</td>
  123. <td class="th" colspan=3>{t}Record value{/t}<td>
  124. </tr>
  125. {section name=id loop=$zone.records}
  126. <tr>
  127. <td><input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} type="text" class="text" name="zone[records][{$zone.records[id].id}][rkey]" size=30 value="{$zone.records[id].rkey}"></td>
  128. <td><input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} type="text" class="text" name="zone[records][{$zone.records[id].id}][ttl]" size=6 value="{$zone.records[id].ttl}"></td>
  129. <td>IN</td>
  130. <td><select {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} class="text" name="zone[records][{$zone.records[id].id}][rtype]" onchange="CheckPrAdd('ed', '{$zone.records[id].id}', this.value)">
  131. <option {if $zone.records[id].rtype == "A"}selected{/if} value="A">A</option>
  132. <option {if $zone.records[id].rtype == "CNAME"}selected{/if} value="CNAME">CNAME</option>
  133. <option {if $zone.records[id].rtype == "MX"}selected{/if} value="MX">MX</option>
  134. <option {if $zone.records[id].rtype == "NS"}selected{/if} value="NS">NS</option>
  135. <option {if $zone.records[id].rtype == "TXT"}selected{/if} value="TXT">TXT</option>
  136. <option {if $zone.records[id].rtype == "SRV"}selected{/if} value="SRV">SRV</option>
  137. </select>
  138. </td>
  139. <td colspan="2">
  140. <input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} onclick="{literal}if (this.value == 'priority') { this.value=''; } {/literal}" id="ed_{$zone.records[id].id}" size="5" style="display:{if $zone.records[id].rtype != "MX" && $zone.records[id].rtype != "SRV"}none{/if};" type="text" class="text" name="zone[records][{$zone.records[id].id}][rpriority]" value="{$zone.records[id].rpriority}" size=30>
  141. <input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} onclick="{literal}if (this.value == 'weight') { this.value=''; } {/literal}" id="ed_{$zone.records[id].id}_weight" size="5" style="display:{if $zone.records[id].rtype != "SRV"}none{/if};" type="text" class="text" name="zone[records][{$zone.records[id].id}][rweight]" value="{$zone.records[id].rweight}" size=30>
  142. <input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} onclick="{literal}if (this.value == 'port') { this.value=''; } {/literal}" id="ed_{$zone.records[id].id}_port" size="5" style="display:{if $zone.records[id].rtype != "SRV"}none{/if};" type="text" class="text" name="zone[records][{$zone.records[id].id}][rport]" value="{$zone.records[id].rport}" size=30>
  143. <input {if $zone.records[id].issystem == 1 && $zone.allow_manage_system_records == 0}disabled{/if} class="text" type=text id="zone[records][{$zone.records[id].id}][rvalue]" name="zone[records][{$zone.records[id].id}][rvalue]" size=30 value="{$zone.records[id].rvalue}">
  144. <span style="display:{if $zone.records[id].rtype != "TXT"}none{/if};vertical-align:middle;" id="spf_link_{$zone.records[id].id}">
  145. &nbsp;&nbsp;&nbsp;<input style="vertical-align:middle;" type="button" onclick="AddSPFRecord('{$zone.records[id].id}', this);" name="spf" value="SPF constructor" class="btn">
  146. </span>
  147. </td>
  148. </tr>
  149. {/section}
  150. <tr>
  151. <td colspan=7>&nbsp;</td>
  152. </tr>
  153. <tr>
  154. <td colspan=7 class="th">{t}Add New Entries Below this Line{/t}</td>
  155. </tr>
  156. {section name=id loop=$add}
  157. <tr>
  158. <td><input type="text" class="text" name="add[{$add[id]}][rkey]" size=30></td>
  159. <td><input type="text" class="text" name="add[{$add[id]}][ttl]" size=6 value="14400"></td>
  160. <td>IN</td>
  161. <td><select class="text" name="add[{$add[id]}][rtype]" onchange="CheckPrAdd('ad', '{$add[id]}', this.value)">
  162. <option selected value="A">A</option>
  163. <option value="CNAME">CNAME</option>
  164. <option value="MX">MX</option>
  165. <option value="TXT">TXT</option>
  166. <option value="NS">NS</option>
  167. <option value="SRV">SRV</option>
  168. </select>
  169. </td>
  170. <td colspan="2">
  171. <input onclick="{literal}if (this.value == 'priority') { this.value=''; } {/literal}" id="ad_{$add[id]}" size="5" style="display:none;" type="text" class="text" name="add[{$add[id]}][rpriority]" value="priority" size=30>
  172. <input onclick="{literal}if (this.value == 'weight') { this.value=''; } {/literal}" id="ad_{$add[id]}_weight" size="5" style="display:none;" type="text" class="text" name="add[{$add[id]}][rweight]" value="weight" size=30>
  173. <input onclick="{literal}if (this.value == 'port') { this.value=''; } {/literal}" id="ad_{$add[id]}_port" size="5" style="display:none;" type="text" class="text" name="add[{$add[id]}][rport]" value="port" size=30>
  174. <input type="text" class="text" id="add[{$add[id]}][rvalue]" name="add[{$add[id]}][rvalue]" size=30>
  175. <span style="display:none;vertical-align:middle;" id="spf_link_{$add[id]}">
  176. &nbsp;&nbsp;&nbsp;<input style="vertical-align:middle;" type="button" onclick="AddSPFRecord('{$add[id]}', this);" name="spf" value="SPF constructor" class="btn">
  177. </span>
  178. </td>
  179. </tr>
  180. {/section}
  181. </table>
  182. <input type="hidden" name="domainname" value="{$domainname}" />
  183. <input type="hidden" name="ezone" value="{$ezone}" />
  184. <input type="hidden" name="formadded" value="true" />
  185. <input type='hidden' name='farmid' value="{$farm.id}" />
  186. <input type='hidden' name='ami_id' value="{$ami_id}" />
  187. {include file="inc/spf_constructor.tpl"}
  188. {/if}
  189. {include file="inc/table_footer.tpl" button2=1}
  190. {include file="inc/footer.tpl"}