cyberman/views/records/add.tt

80 lines
2.0 KiB
Plaintext
Raw Normal View History

2017-08-11 22:28:32 +02:00
<center>
2017-08-20 00:45:25 +02:00
<br />
<h1>Add a record</h1>
<br />
2017-08-11 22:28:32 +02:00
</center>
<% IF error %>
<div style="text-align:center">
2017-08-20 00:45:25 +02:00
<div class="msgBox" style="text-align:left">
There were some problems with your submission:
<br />
<ul>
<% IF e_bad_value %>
<li>The value you entered was invalid.
2019-02-23 06:04:30 +01:00
<% IF params.type == 'NS' || params.type == 'CNAME' || params.type == 'MX' %>(Did you forget the trailing '.'? e.g. "fqdnname.tld<b>.</b>")<% END %></li>
2017-08-20 00:45:25 +02:00
<% END %>
<% IF e_bad_type %>
<li>You must choose a type for the record.</li>
<% END %>
<% IF e_bad_name %>
<li>The name of the record is invalid.</li>
<% END %>
</ul>
</div>
2017-08-11 22:28:32 +02:00
</div>
<br />
<% END %>
<div class="body">
2017-08-20 00:45:25 +02:00
<em>Adding a record for <% domain.name | html_entity %>.<% vars.config.tld %></em>
2017-08-11 22:28:32 +02:00
2017-08-20 00:45:25 +02:00
<form method="POST" class="login">
<table class="domains">
<tr>
<td>
<strong>
<label for="name">Record name:</label>
</strong>
</td>
<td>
<input type="text" style="width: 100px" name="rname" id="rname" placeholder="Use @ for root"
value="<% params.rname | html_entity %>" />.<% domain.name | html_entity %>.<% vars.config.tld %>
2017-08-20 00:45:25 +02:00
</td>
</tr>
<tr>
<td>
<strong>
<label for="type">Record type:</label>
</strong>
</td>
<td>
<select name="type" id="type">
<%# TODO: machine generate this %>
2019-02-23 06:05:36 +01:00
<option value="" selected>- Select -</option>
2017-08-20 00:45:25 +02:00
<option value="A">A</option>
<option value="AAAA">AAAA</option>
<option value="CNAME">CNAME</option>
2019-02-23 06:04:30 +01:00
<option value="MX">MX</option>
<option value="TXT">TXT</option>
2017-08-20 00:45:25 +02:00
<option value="NS">NS</option>
</select>
</td>
</tr>
<tr>
<td>
<strong>
<label for="value">Value:</label>
</strong>
</td>
<td>
2019-02-23 06:05:36 +01:00
<input type="text" name="value" id="value" value="<% params.value | html_entity %>" required/>
2017-08-20 00:45:25 +02:00
</td>
</tr>
</table>
<br />
2019-02-23 06:04:30 +01:00
[&nbsp;<button action="submit" class="textButton">Create&nbsp;record</button>&nbsp;]
[&nbsp;<a class="bracketButton" href="../records">Go&nbsp;back</a>&nbsp;]
2017-08-20 00:45:25 +02:00
</form>
2017-08-11 22:28:32 +02:00
</div>