cqtu/templates/registration/register.html

55 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2017-01-20 14:28:59 +01:00
{% extends "base.html" %}
2017-01-20 17:29:21 +01:00
{% load crispy_forms_tags %}
2017-01-20 14:28:59 +01:00
{% block content %}
<div class="row">
<div class="col-sm-12">
2017-01-20 17:29:21 +01:00
<div class="panel panel-default">
<div class="panel-heading">Registration</div>
<div class="panel-body">
<p>
Please register with your (uppercase) Callsign as Usernames.
For DN-Calls, -[0-9] is allowed (e.g. DN1ABC-2 for the second group).
2017-01-20 17:29:21 +01:00
</p>
<p>
Note: If you are a <strong>Ham/OM/YL</strong> please with your <strong>own</strong> callsign (e.g. DL7DOC). If you are a <strong>SWL</strong>, please use the <strong>DN-Call provided</strong> by your operator.
</p>
2017-01-20 17:29:21 +01:00
<form method="POST" action="{% url 'register' %}">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Register">
</form>
</div>
</div>
2017-01-20 14:28:59 +01:00
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
function isDNCall(e) {
var call = $("#id_username").val().toUpperCase();
var disableState = false;
if(call.startsWith("DN")) {
var disableState = true;
}
$("#id_dncall").prop("disabled", disableState);
$("#id_qrv2m").prop("disabled", disableState);
$("#id_qrv70cm").prop("disabled", disableState);
$("#id_extra2m70cm").prop("disabled", disableState);
if(disableState) {
$("#id_dncall").prop("value", "");
$("#id_qrv2m").prop("checked", false);
$("#id_qrv70cm").prop("checked", false);
$("#id_extra2m70cm").prop("checked", false);
}
console.log($("#id_dncall"));
}
$("#id_username").on("input", isDNCall);
$("#id_username").change(isDNCall);
});
</script>
{% endblock %}