A collection of minor improvements. #36

Open
mia wants to merge 20 commits from mia/cyberman:master into master
17 changed files with 78 additions and 72 deletions

View File

@ -1,14 +1,15 @@
function updateOwnerEmail() { function showOwnerEmail(in_name) {
var name = this.domainName; let name = in_name;
document.getElementById("owneremail-"+name).innerHTML = this.responseText; if (!document.getElementById('owneremail-' + name)) {
} return;
}
function showOwnerEmail(name) { document.getElementById('owneremail-' + name).innerHTML = 'Loading...';
document.getElementById("owneremail-"+name).innerHTML = "Loading..."; fetch('/api/get_owner_email?name=' + encodeURIComponent(name), {
method: 'GET',
var req = new XMLHttpRequest(); mode: 'cors'
req.domainName = name; }).then(g => g.text()).then(g => {
req.addEventListener("load", updateOwnerEmail); document.getElementById('owneremail-' + name).innerHTML = g;
req.open("GET", "/api/get_owner_email?name="+encodeURIComponent(name)); }).catch((e) => {
req.send(); console.log('server error', e);
} });
}

View File

@ -1,23 +1,20 @@
function updateAvailability() {
if (this.responseText === "y") {
document.getElementById("avail").innerHTML = "Available!";
} else {
document.getElementById("avail").innerHTML = "Not available";
}
}
function checkAvailability() { function checkAvailability() {
var name = document.getElementById("name").value; let name = document.getElementById('name').value;
if (name === '') {
if (name === "") { document.getElementById('avail').innerHTML = '';
document.getElementById("avail").innerHTML = ""; return;
return
} }
document.getElementById('avail').innerHTML = 'Checking availability...';
document.getElementById("avail").innerHTML = "Checking availability..."; fetch('/api/check_availability?name=' + encodeURIComponent(name), {
method: 'GET',
var req = new XMLHttpRequest(); mode: 'cors'
req.addEventListener("load", updateAvailability); }).then(g => g.text()).then(g => {
req.open("GET", "/api/check_availability?name="+encodeURIComponent(name)); if (g === 'y') {
req.send(); document.getElementById('avail').innerHTML = 'Available!';
} } else {
document.getElementById('avail').innerHTML = 'Not available';
}
}).catch((e) => {
document.getElementById('avail').innerHTML = 'Server error';
});
}

View File

@ -54,7 +54,7 @@
<label for="email">Email address:</label> <label for="email">Email address:</label>
</td> </td>
<td> <td>
<input type="email" name="email" id="email" value="<% user.email | html_entity %>" /> <input type="email" name="email" id="email" value="<% user.email | html_entity %>" required/>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -130,6 +130,6 @@
</tr> </tr>
</table> </table>
<br /> <br />
[&nbsp;<button class="textButton" action="submit">update</button>&nbsp;] [&nbsp;<button class="textButton" action="submit">Update</button>&nbsp;]
</form> </form>
</div> </div>

View File

@ -15,7 +15,7 @@ Description
We are also going to implement an opt-in mailing list which would permit notifications of domain registrations to be sent out to all those interested. This will, of course, be optional on both sides (opt-in to notify, opt-in to receive). We are also going to implement an opt-in mailing list which would permit notifications of domain registrations to be sent out to all those interested. This will, of course, be optional on both sides (opt-in to notify, opt-in to receive).
Furthermore, we will provide a certificate authority and issue each domain owner with a corresponding certificate. Alternative names and wildcards can also be requested. <!--Furthermore, we will provide a certificate authority and issue each domain owner with a corresponding certificate. Alternative names and wildcards can also be requested.-->
Registration Registration
- - - - - - - - - - - -

View File

@ -31,7 +31,7 @@
<label for="password">New password:</label> <label for="password">New password:</label>
</td> </td>
<td> <td>
<input type="password" name="password" id="password" /> <input type="password" name="password" id="password" required/>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -39,11 +39,11 @@
<label for="password2">New password (confirm):</label> <label for="password2">New password (confirm):</label>
</td> </td>
<td> <td>
<input type="password" name="password2" id="password2" /> <input type="password" name="password2" id="password2" required/>
</td> </td>
</tr> </tr>
</table> </table>
<br /> <br />
[&nbsp;<button class="textButton" action="submit">update</button>&nbsp;] [&nbsp;<button class="textButton" action="submit">Update</button>&nbsp;]
</form> </form>
</div> </div>

View File

@ -6,4 +6,6 @@
<div class="body"> <div class="body">
Your email address was confirmed successfully. Your email address was confirmed successfully.
<br />
<p>[&nbsp;<a class="bracketButton" href="login">Log&nbsp;in</a>&nbsp;]
</div> </div>

View File

@ -31,8 +31,8 @@
<form method="POST" class="login"> <form method="POST" class="login">
<input type="text" name="name" id="name" onkeyup="checkAvailability()">.<% vars.config.tld %> <input type="text" name="name" id="name" onkeyup="checkAvailability()">.<% vars.config.tld %>
<br /><br /> <br /><br />
[&nbsp;<button action="submit" class="textButton">register&nbsp;domain</button>&nbsp;] [&nbsp;<button action="submit" class="textButton">Register&nbsp;domain</button>&nbsp;]
[&nbsp;<a href="../domains" class="bracketButton">go&nbsp;back</a>&nbsp;] [&nbsp;<a href="../domains" class="bracketButton">Go&nbsp;back</a>&nbsp;]
</form> </form>
<span id="avail"></span> <span id="avail"></span>
</div> </div>

View File

@ -20,6 +20,8 @@
<form method="POST"> <form method="POST">
[&nbsp;<button class="textButton" action="submit">yes,&nbsp;destroy&nbsp;the&nbsp;domain</button>&nbsp;] [&nbsp;<button class="textButton" action="submit">yes,&nbsp;destroy&nbsp;the&nbsp;domain</button>&nbsp;]
</form> </form>
<br />
[&nbsp;<a href="../../domains" class="bracketButton">No,&nbsp;I&nbspchanged&nbspmy&nbspmind&nbsp;</a>&nbsp;]
</center> </center>
</p> </p>
</div> </div>

View File

@ -1,6 +1,8 @@
Hello! Hello!
You're receiving this email because someone tried to reset your cybNIC password. If this was you, please click the link below: You're receiving this email because someone tried to reset your cybNIC password.
If this was you, please click the link below to reset your password:
<% link %> <% link %>
If it wasn't, you can safely ignore this email. If it wasn't, you can safely ignore this email.

View File

@ -5,4 +5,4 @@ You're receiving this email because someone used your email address to sign up f
If this was you and you'd like to confirm your account, please click this link: If this was you and you'd like to confirm your account, please click this link:
<% link %> <% link %>
Otherwise, feel free to ignore this email - we won't send any more. Otherwise, feel free to ignore this email - we won't send anymore.

View File

@ -2,7 +2,7 @@ Hello!
You're receiving this email because someone entered your email address into cybNIC. You're receiving this email because someone entered your email address into cybNIC.
If this was you and you'd like to use this address, please click this link: If this was you and you'd like to change your email address to this one, please click this link:
<% link %> <% link %>
Otherwise, feel free to ignore this email. Otherwise, feel free to ignore this email.

View File

@ -5,10 +5,10 @@
<% IF err || success %> <% IF err || success %>
<div class="msgBox"> <div class="msgBox">
<% IF e_no_user %> <% IF e_no_user %>
Error: There is no user account associated with that email address. An email has been sent if there is an account. Please click the link to reset your password.
<% END %> <% END %>
<% IF success %> <% IF success %>
An email has been sent to <% params.email | html_entity %>. Please click the link to reset your password. An email has been sent if there is an account. Please click the link to reset your password.
<% END %> <% END %>
</div> </div>
<br /><br /> <br /><br />
@ -20,8 +20,8 @@
<br /> <br />
<form method="POST"> <form method="POST">
<label for="email">Email address:</label> <label for="email">Email address:</label>
<input type="email" name="email" id="email" value="<% params.email | html_entity %>"/> <input type="email" name="email" id="email" value="" required/>
<br /> <br />
[&nbsp;<button action="submit" class="textButton">submit</button>&nbsp;] [&nbsp;<button action="submit" class="textButton">Send link</button>&nbsp;]
</form> </form>
</div> </div>

View File

@ -10,6 +10,6 @@
<p>You can <a href="charter">read our charter</a> for more information and details on how to report abuse of cybNIC services.</p> <p>You can <a href="charter">read our charter</a> for more information and details on how to report abuse of cybNIC services.</p>
<p>Create or log in to an account in order to register or update .cyb domains.</p> <p>Create or log in to an account in order to register or update .cyb domains.</p>
<center> <center>
<p>[&nbsp;<a class="bracketButton" href="login">log&nbsp;in</a>&nbsp;]&nbsp;&nbsp;[&nbsp;<a class="bracketButton" href="register">register</a>&nbsp;]</p> <p>[&nbsp;<a class="bracketButton" href="login">Log&nbsp;in</a>&nbsp;]&nbsp;&nbsp;[&nbsp;<a class="bracketButton" href="register">Register</a>&nbsp;]</p>
</center> </center>
</div> </div>

View File

@ -5,14 +5,14 @@
<% IF account_created %> <% IF account_created %>
<div class="msgBox"> <div class="msgBox">
Your account has been created and a confirmation email sent to <% params.email | html_entity %>. Please confirm your email address, then log in here. Your account has been created and a confirmation email sent to <% params.email | html_entity %>. Please confirm your email address to confirm your registration.
</div> </div>
<br /><br /> <br /><br />
<% END %> <% END %>
<% IF params.pwchange %> <% IF params.pwchange %>
<div class="msgBox"> <div class="msgBox">
Your password has been changed and all browsers logged out. Please log in again here. Your password has been changed and all sessions logged out. Please log in again.
</div> </div>
<br /><br /> <br /><br />
<% END %> <% END %>
@ -20,13 +20,13 @@
<% IF error %> <% IF error %>
<div class="msgBox"> <div class="msgBox">
<% IF e_no_user %> <% IF e_no_user %>
The email address <% params.email | html_entity %> is not registered. Your email address is not registered or the password is incorrect.
<% END %> <% END %>
<% IF e_pass %> <% IF e_pass %>
Your password was incorrect, sorry. Your email address is not registered or the password is incorrect.
<% END %> <% END %>
<% IF e_not_confirmed %> <% IF e_not_confirmed %>
Please confirm your email address using the link sent to <% params.email | html_entity %>. Please confirm your email address.
<% END %> <% END %>
</div> </div>
<br /><br /> <br /><br />
@ -42,7 +42,7 @@
<label for="email">Email address:</label> <label for="email">Email address:</label>
</td> </td>
<td> <td>
<input type="email" name="email" id="email" /> <input type="email" name="email" id="email" required/>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -50,14 +50,14 @@
<label for="password">Password:</label> <label for="password">Password:</label>
</td> </td>
<td> <td>
<input type="password" name="password" id="password" /> <input type="password" name="password" id="password" required/>
</td> </td>
</tr> </tr>
</table> </table>
<br /> <br />
[&nbsp;<button action="submit" class="textButton">log&nbsp;in</button>&nbsp;] [&nbsp;<button action="submit" class="textButton">Log&nbsp;in</button>&nbsp;]
[&nbsp;<a href="index" class="bracketButton">go&nbsp;back</a>&nbsp;] [&nbsp;<a href="index" class="bracketButton">Go&nbsp;back</a>&nbsp;]
<br /><br /> <br /><br />
[&nbsp;<a href="forgot" class="bracketButton">recover forgotten password</a>&nbsp;] [&nbsp;<a href="forgot" class="bracketButton">Recover password</a>&nbsp;]
</form> </form>
</div> </div>

View File

@ -12,7 +12,7 @@
<ul> <ul>
<% IF e_bad_value %> <% IF e_bad_value %>
<li>The value you entered was invalid. <li>The value you entered was invalid.
<% IF params.type == 'NS' || params.type == 'CNAME' %>(Did you forget the trailing '.'?)<% END %></li> <% IF params.type == 'NS' || params.type == 'CNAME' || params.type == 'MX' %>(Did you forget the trailing '.'? e.g. "fqdnname.tld<b>.</b>")<% END %></li>
<% END %> <% END %>
<% IF e_bad_type %> <% IF e_bad_type %>
<li>You must choose a type for the record.</li> <li>You must choose a type for the record.</li>
@ -51,10 +51,12 @@
<td> <td>
<select name="type" id="type"> <select name="type" id="type">
<%# TODO: machine generate this %> <%# TODO: machine generate this %>
<option value="">- Select -</option> <option value="" selected>- Select -</option>
<option value="A">A</option> <option value="A">A</option>
<option value="AAAA">AAAA</option> <option value="AAAA">AAAA</option>
<option value="CNAME">CNAME</option> <option value="CNAME">CNAME</option>
<option value="MX">MX</option>
<option value="TXT">TXT</option>
<option value="NS">NS</option> <option value="NS">NS</option>
</select> </select>
</td> </td>
@ -66,12 +68,12 @@
</strong> </strong>
</td> </td>
<td> <td>
<input type="text" name="value" id="value" value="<% params.value | html_entity %>" /> <input type="text" name="value" id="value" value="<% params.value | html_entity %>" required/>
</td> </td>
</tr> </tr>
</table> </table>
<br /> <br />
[&nbsp;<button action="submit" class="textButton">create&nbsp;record</button>&nbsp;] [&nbsp;<button action="submit" class="textButton">Create&nbsp;record</button>&nbsp;]
[&nbsp;<a class="bracketButton" href="../records">go&nbsp;back</a>&nbsp;] [&nbsp;<a class="bracketButton" href="../records">Go&nbsp;back</a>&nbsp;]
</form> </form>
</div> </div>

View File

@ -1,3 +1,3 @@
<div class="body"> <div class="body">
Redirecting, please wait. Redirecting...
</div> </div>

View File

@ -42,7 +42,7 @@
<label for="email">Email address:</label> <label for="email">Email address:</label>
</td> </td>
<td> <td>
<input type="email" name="email" id="email" value="<% params.email | html_entity %>" /> <input type="email" name="email" id="email" value="<% params.email | html_entity %>" required/>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -50,7 +50,7 @@
<label for="password">Password:</label> <label for="password">Password:</label>
</td> </td>
<td> <td>
<input type="password" name="password" id="password" value="<% params.password | html_entity %>" /> <input type="password" name="password" id="password" value="" required/>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -58,13 +58,13 @@
<label for="password2">Confirm password:</label> <label for="password2">Confirm password:</label>
</td> </td>
<td> <td>
<input type="password" name="password2" id="password2" value="<% params.password2 | html_entity %>" /> <input type="password" name="password2" id="password2" value="" required/>
</td> </td>
</tr> </tr>
</table> </table>
<br /> <br />
[&nbsp;<button action="submit" class="textButton">register</button>&nbsp;] [&nbsp;<button action="submit" class="textButton">Register</button>&nbsp;]
[&nbsp;<a href="index" class="bracketButton">go&nbsp;back</a>&nbsp;] [&nbsp;<a href="index" class="bracketButton">Go&nbsp;back</a>&nbsp;]
<br /><br /> <br /><br />
<em>By registering, you agree to be bound by the policies set forward in our <a href="charter">charter</a>.</em> <em>By registering, you agree to be bound by the policies set forward in our <a href="charter">charter</a>.</em>
</form> </form>